[R] Creating loops with strings

Rakknar aliengenesis at yahoo.com
Tue Sep 22 22:50:09 CEST 2009


Hello. I'm trying to run a series of commands in two different datasets. For
make it efficient I want to make a loop for it. Until now the only command
for loops i found it's the for() command it's only for series of numbers and
not a series of strings, witch it's what i'm needing. It would be something
like this

for(i in dataset1 dataset2) {
            i <- read.dta("dataset1.dta")
            ls()
            summary(i)
            str(i)
            attach(i)
            }

I hope the idea it's clear. I'm using 2.9.1 Windows Version of R.

Thanks.
-- 
View this message in context: http://www.nabble.com/Creating-loops-with-strings-tp25530899p25530899.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list