I've been using the glmnet R package to build a LASSO regression model for one target variable Y (numeric) and 762 covariates. I use the glmnet() function and then coef(fit, s = 0.056360) to get the coefficient values for that specific value of lambda.
What I now need is the variable selection order, i.e. which of the selected covariates is selected first (enters the model first), second, third and so on.
When using plot(fit, label = TRUE) I can theoretically see the order via the plotted paths, however, there are too many covariates for the labels to be legible.
You can see from the image that the first covariate is 267 (green path), then comes 12, but the rest is illegible.




You can find the fitted model for each lambda along the path in
fit$beta. One way to get what you want is to loop through that matrix and check at which step each variable enters the model. You can then use that information to order the list of variables. Here is a quick-and-dirty way to do this: