[R] Fold function with several time varying covariates

Bjarke Christensen Bjarke.Christensen at sydbank.dk
Tue Jun 30 14:57:35 CEST 2009


Helen,

You are asking for help with a function which is not part of R, and your
question is nowhere nearly detailed enough to make it possible to replicate
the error. However, if the function you are using is the one available in
http://cran.r-project.org/doc/contrib/Fox-Companion/app-scripts.zip and my
guess as to what commands you entered in order to produce the error is
correct, then your problem is most likely that you are entering cov.names
as a list instead of a character vector.

An example: you might be typing
      cov.names = list('age', 'gender', 'occupation')
when you should be typing
      cov.names = c('age', 'gender', 'occupation')

According to the documentation for the function I think you may be using,
cov should be a list of vectors, while cov.names should be a character
vector containing the names of each covariate.

I hope this helps - if it doesn't, you might try posting a self-contained
example (code) that we can try on our systems and that will provoke the
same error.

Bjarke Christensen.

Helen Jenkins wrote:
>The error message when I use list is:
>" s.matrix(!is.na(new.data[, cov.names])) :
>  invalid subscript type 'list'"




More information about the R-help mailing list