From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Sun 17 Jun 2001 - 02:11:22 EST
Message-ID: <Pine.LNX.4.31.0106161709480.2271-100000@gannet.stats>
On Sat, 16 Jun 2001, Matt Pocernich wrote:
> How do I paste together text and number so that it is acceptable as an
> object to which I can assign a value?
>
> > paste("file", 1, "max", sep="") <- 1
> Error: Target of assignment expands to non-language object
> >
Use assign. As in
> assign(paste("file", 1, "max", sep=""), 1)
> ls()
[1] "file1max"
-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:45 EST