Error Error in storage.mode(x) <- "double" : 'list' object cannot be coerced to type 'double'

I am trying to run a correlation matrix. My variables are numeric. I am unsure why I keep getting this message?

nmdata_y1 <- read.csv(X, header = TRUE)
View(nmdata_y1)
sapply(nmdata_y1, class)
nmdata_y1 <- lapply(nmdata_y1, as.numeric)
table(nmdata_y1$GRADEY1)
library("Hmisc")
nm_corr_y1 <- rcorr(as.matrix(nmdata_y1))

which gives the error

Error in storage.mode(x) <- “double” :
‘list’ object cannot be coerced to type ‘double’

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)