Re: [R] cv.lm syntax error

From: John Maindonald <john.maindonald_at_anu.edu.au>
Date: Thu, 10 Mar 2011 08:47:06 +1100

It means that dat$v1, dat$v2, . . . are not columns in the data frame df

Specify the formula as v1 ~ v2+v2+v3+v4+v5+factor Then (assuming that factor is a column object of the right length) you should be fine.

John Maindonald email: john.maindonald_at_anu.edu.au phone : +61 2 (6125)3473 fax : +61 2(6125)5549 Centre for Mathematics & Its Applications, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian National University, Canberra ACT 0200. http://www.maths.anu.edu.au/~johnm

> From: agent dunham <crosspide_at_hotmail.com>
> Date: 9 March 2011 3:47:10 AM AEDT
> To: r-help_at_r-project.org
> Subject: Re: [R] cv.lm syntax error
>
>
> Thanks for your answer, but I type the following:
>

>> dfmod.1 <- data.frame(dat$v1,dat$v2,dat$v3,dat$v4, dat$v5,factor)

>
>> CVlm(df= dfmod.1, form.lm = formula(dat$v1 ~ dat$v2+dat$v3+ dat$v4+
>> dat$v5+ factor), m=3, seed=29, plotit=TRUE, printit =TRUE) 

>
> Error en `[.data.frame`(df, , ynam) : undefined columns selected
>
> What does it mean?
>
> user_at_host.com
>
> --
> View this message in context: http://r.789695.n4.nabble.com/cv-lm-syntax-error-tp3334889p3341767.html
> Sent from the R help mailing list archive at Nabble.com.

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 09 Mar 2011 - 21:53:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Mar 2011 - 22:00:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive