[R] Names

David Scott d.scott at auckland.ac.nz
Wed Dec 20 01:15:10 CET 2000

I am trying to create a set of vectors which have similar names. They have
a common part and an extra unique part. I am sure I have seen questions on
this before but I have been unable to find it in the archive. There are
examples of sets of names for columns of a data frame, but not for
individual vectors.

Suppose I want vectors named myvar.1 myvar.2 etc.

I tried:
> as.name(paste("myvar","1",sep="."))<-1:10
Error: Target of assignment expands to non-language object

> is.language(as.name(paste("myvar","1",sep=".")))
[1] TRUE

Any suggestions as to how to do this?

David Scott 

David Scott     Department of Statistics
                The University of Auckland, PB 92019
                Auckland        NEW ZEALAND
Phone: +64 9 373 7599 ext 6830     Fax: +64 9 373 7018            
Email:  d.scott at Auckland.ac.nz

President, New Zealand Statistical Association
Head, Department of Statistics, University of Auckland

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