hongooi73 / glmnetUtils

Utilities for glmnet
65 stars 18 forks source link

makeModelComponents fails when input data is grouped_df #10

Closed hongooi73 closed 7 years ago

hongooi73 commented 7 years ago
library(dplyr)
grp_df <- data_frame(x1 = 1:10, x2 = 1:10, y=1:10) %>% group_by(x1)
glmnetUtils:::makeModelComponents(y ~ x1 + x2, grp_df)

#Error in eval(substitute(expr), envir, enclos) : 
#  cannot convert object to a data frame
hongooi73 commented 7 years ago

See https://github.com/hadley/dplyr/issues/2474