[R] Error in leaps.setup
Thomas Lumley
tlumley at u.washington.edu
Thu Apr 8 18:35:09 CEST 2010
On Wed, 7 Apr 2010, thedoctor81877 wrote:
>
> Hullo,
> I am trying to use the leaps package, & keep getting the following error:
> Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = NCOL(x) + int, :
> y and x different lengths
x might be a data frame rather than a matrix.
In any case, although you don't say, my psychic debugging powers tell me that you are using the leaps() function from the package. Use regsubsets() instead. As the help page indicates, leaps() is just there for compatibility with S-PLUS.
> My data set is attached below.
No, it isn't. It may have been stripped off by the mailing list.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
More information about the R-help
mailing list