'(list) object cannot be coerced to type 'double'

I just started the package SIS in R. I use their test data set an get an error. I am quite sure there is a problem.

install.packages("SIS",dependencies=T)
library(SIS)
data(prostate.test)

I then try to use the function SIS, which has as input

SIS(x, y, family = c("gaussian","binomial","poisson","cox"),
    penalty=c("SCAD","MCP","lasso"), concavity.parameter =
    switch(penalty, SCAD=3.7, 3), tune = c("cv","aic","bic","ebic"),
    nfolds = 10, type.measure = c("deviance","class","auc","mse",
    "mae"), gamma.ebic = 1, nsis = NULL, iter = TRUE, iter.max =
    ifelse(greedy==FALSE,10,floor(nrow(x)/log(nrow(x)))), varISIS =
    c("vanilla","aggr","cons"), perm = FALSE, q = 1, greedy = FALSE,
    greedy.size = 1, seed = 0, standardize = TRUE)

where x is the design matrix, of dimensions n * p, without an intercept. Each row is an observation vector and y the response vector of dimension n * 1. I format their test data (the last column is the response)

prostate.test->k
k[,-dim(k)[2]]->k1
k[,dim(k)[2]]->k11
SIS(k1,k11)

then I get Error in storage.mode(x) = "numeric" : (list) object cannot be coerced to type 'double'

Could somebody tell me how I can avoid that error?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source