Trying to perform feature selection in R. I am using the glmnet package to do this. Here is my code so far:
lasso_model = glmnet(as.matrix(x = lasso, y = lasso_target,
standardize=TRUE, alpha=1))
lasso is a dataframe full of numeric and categoric predictors. The first column is the target variable which I have dropped.
lasso_target is the target variable that I dropped stored as its own dataframe.
Error:
Error in drop(y) : argument "y" is missing, with no default
My goal is to remove uninformative features from my dataframe before feeding it into my model. Any help would be greatly appreciated!