[R] Error in match.names(clabs, names(xi)) : names do not match previous names

Bert Gunter gunter.berton at gene.com
Sun Mar 30 16:32:25 CEST 2014


Please read ?"[" carefully -- or (re?)-read "An Introduction to R."
The column name must be quoted:

temp.df[,"month"]<-month

-- Bert



Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch




On Sun, Mar 30, 2014 at 4:04 AM, Bill <william108 at gmail.com> wrote:
> Not sure why but when I change this:
>
> temp.df[,month]<-month
> temp.df[,year]<-year
>
> to this:
> temp.df[,2]<-month
> temp.df[,1]<-year
>
> it seems to work.
>
> On Sun, Mar 30, 2014 at 6:01 PM, Bill <william108 at gmail.com> wrote:
>
>> temp.df[,month]<-month
>> temp.df[,year]<-year
>>
>
>         [[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