Re: [R] extracting objects from lists

2010-09-15 Thread Roman Luštrik
You can explore the structure of the list with str(). If you use Eclipse, a list of available options will be created for you as you type (see http://imagepaste.nullnetwork.net/viewimage.php?id=1293). Cheers, Roman -- View this message in context:

[R] extracting objects from lists

2010-09-14 Thread lord12
If you have 5 data frames and you append them to a list, how do you access the first data frame, not the first value of the first data frame while iterating in a for loop? list = c(d1,d2,d3,d4,d5) where d1..d5 are dataframes. for(i in 1: length(list)){ print(list[1]) } -- View this message in

Re: [R] extracting objects from lists

2010-09-14 Thread jim holtman
First create a list of the dataframe and then do the loop: myList - list(d1, d2, d3, d4, d5) for (i in myList) print(i) or for (i in seq(length(myList))) print(myList[[i]]) On Tue, Sep 14, 2010 at 2:13 PM, lord12 gaut...@yahoo.com wrote: If you have 5 data frames and you append them to a

Re: [R] extracting objects from lists

2010-09-14 Thread Dennis Murphy
Hi: On Tue, Sep 14, 2010 at 11:13 AM, lord12 gaut...@yahoo.com wrote: If you have 5 data frames and you append them to a list, how do you access the first data frame, not the first value of the first data frame while iterating in a for loop? For a list named l, l[[1]] accesses the first