Importing Excel format data into R/R Studio and using glmnet package?
I have no problem importing Excel formatted data into R/R Studio and use all other R packages that I use. But, when I want to use the glmnet package to develop a regularization model, I invariably run into the following error (after specifying my regularization model and attempting to run it):
Error in storage.mode(y) - "double":
(list) object cannot be coerced to type 'double'
Here is what I have already tried to resolve this:
De-format the numbers in Excel (no scientific notation, no %, etc.)
Did copy-paste-special values several times
At time of importing the spreadsheet, converted every column from "include" to "numeric" type
After importing the data, converting it to a matrix.
But, none of the above have eliminated the error.
Topic regularization data excel error-handling r
Category Data Science