Skip to content
Back to formatted view

Raw Message

Message-ID: <43FD8F2C.10502@statistik.uni-dortmund.de>
Date: 2006-02-23T10:32:12Z
From: Uwe Ligges
Subject: automatic generation of variable names
In-Reply-To: <NOEOKKCPBGIAIPPDONMGMEOFCBAA.b.otto@uke.uni-hamburg.de>

Benjamin Otto wrote:

> Hi,
> 
> is there some way to generate a varaible name automatically?


See the R FAQs: "How can I turn a string into a variable?"

Uwe Ligges




> What I would like to do is:
> 
> Instead
> -------
> 
> table1 <- orderbysomecolumn
> table2 <- orderbysomecolumn
> table3 <- orderbysomecolumn
> ...
> 
> automate
> --------
> for (i in 1:numoftables) {
>    table%someconcatenation%i <- orderbysomecolumn
> }
> 
> regards,
> Benjamin
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html