[R] question regarding names() value assignment
Alex Buerkle
cbuerkle at bio.indiana.edu
Tue Jun 29 22:05:22 CEST 1999
I am having trouble assigning a name to single columns in a dataframe.
The following is an example using 0.64.1 and linux.
tmp is a dataframe.
> names(tmp)
[1] "some" "thing"
> names(tmp)<-c("else","again")
> names(tmp)
[1] "else" "again"
> names(tmp[2])
[1] "again"
> names(tmp[2])<-"altogether"
> names(tmp[2])
[1] "again"
Can anyone explain this behavior to me?
Thanks, Alex
~^^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
C. Alex Buerkle Ph: 812-855-9018
Jordan Hall 142 Fax: 812-855-6705
Department of Biology
Indiana University
Bloomington, IN 47405 cbuerkle at bio.indiana.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list