[R] creating a "list of 3 dataframes" from a "list of 2 dataframes" and a dataframe?
Rajarshi Guha
rguha at indiana.edu
Mon May 14 21:39:17 CEST 2007
On May 14, 2007, at 2:48 PM, new ruser wrote:
> #I wish to create a "list of three dataframes" ("results2") from a
> "list of two dataframes" (temp) and a dataframe ("c")?
>
> #Please advise.
>
> a <- data.frame(x=c(1,2,3),y=c(5,7,9))
> b <- data.frame(x=c(2,4,7,9),y=c(2,3,5,4))
> c <- data.frame(x=c(22,34,7,9),y=c(52,63,5,4))
> results1 <- list(a,b,c) #what I want
>
> #but this is how I need to get there
> temp <- list(a,b)
> #results2 <- fun?????(temp2,c) # I need help here
temp[[ length(temp) + 1 ]] <- c
results2 <- temp
-------------------------------------------------------------------
Rajarshi Guha <rguha at indiana.edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
Does Ramanujan know Polish?
-- E.B. Ross
More information about the R-help
mailing list