[R] about colnames
Jeff Newmiller
jdnewmil at dcn.davis.ca.us
Tue Jan 31 06:54:56 CET 2012
The problem occurred when you imported your data, but you haven't shown those steps.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
xiaocong zuo <xiaocong.zuo at gmail.com> wrote:
>Hi,
>
>when I run the below code,there is an error occured. could you please
>tell
>me how to treat it?
>> pdf('covariate.pdf')
>> par(mfrow=c(1,1))
>> pairs(data2[,c("ID","TYPE","AGE","GNDR","HT")],
>+ panel=function(x,y) { points(x,y); lines(lowess(x,y))})
>Error in `[.data.frame`(data2, , c("ID", "TYPE", "AGE", "GNDR", "HT"))
>:
> undefined columns selected
>> dev.off()
>RStudioGD
> 2
>
> when I try colnames(data2) or names(data2) ,it shows as follows:
>> colnames(data2)
> [1] "X" "X1" "X0" "." "..1"
>I think this may be the problem. Could you please tell me how to treat
>it?
>
>Thank you!
>
>Cassie
>
> [[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.
More information about the R-help
mailing list