Closed slackline closed 7 years ago
This is due to peculiarities in how S3 class methods are found. If you switch the order of your arguments so that they match the declared signature, and remove the empty family
argument, things should work:
...
if(input$glmnet == TRUE){
glmnetUtils::glmnet(formula = mpg ~ cyl + disp + hp,
data = mtcars)
}
..
Thats sorted it thank you very much. I've never encountered that peculiarity with the S3 class methods. Will try and remember it in the future though.
Hi,
Really grateful for your work on this, makes testing glmnet models a lot easier and moves towards standardising the formula based approach.
I'm trying to use glmnetUtils within a Shiny app I'm working on but have found that the data frame does not appear to be handled correctly when
glmnetUtils::glmnet()
is called. A simple example is...server.R
ui.R
If
glm()
is called the printed results of the fitted model are shown, but ifglmnetUtils::glmnet()
is called then the data frame isn't parsed correctly and the following error is reported...I realise this might be a Shiny issue but since
glm()
parses/uses the data frame correctly I think, but am not sure, that the problem may lie withinglmnetUtils::glmnet()
somewhere.