[R] names of the lists (was: Mime-Version: 1.0)

Ott Toomet otoomet at econ.dk
Thu Nov 28 16:36:00 CET 2002


You are using strange subject lines.

 | Date: Thu, 28 Nov 2002 12:10:51 +0100
 | From: Niesel Katharina <katharina.niesel at eawag.ch>
 | Hello,
 | how can I create several lists, whose names are composed of "Lst" and the
 | number "i" of the loop (Lst1, Lst2... Lst3000)? Thank you for your help. 

You should do either something like

assign(paste("Lst", i, sep=""), value)

or rather use a list of the lists:

Lst <- vector("list", 3000)
Lst[i] <- value

Perhaps it helps.

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