This does not look like a "list of dataframes" where each dataframe is
an element of the list. This appears to just be a list with all the
elements of the data frames at the same levels. A list of data frames
would look like this:
> x <- list(data.frame(a=1:5, b=1:5), data.frame(a=6:10, b=6:10))
Greetings Douglas/Jim/John/R-help,
Thanks for your help so far.
Answering your questions - doing an "str' on the list reveals
following (head) information :
---
$ : Factor w/ 729 levels "XX1","YY1",..: 6 9 10 12 13 14 19 22 29 30 ...
$ : int [1:109] 19950201 19
I just tried an artifical example and the approach
seems to work okay
# Joining data.frames stored in a list
# From "Douglas Bates"
aa <- 1:4
bb <- 2:5
cc <- 3:6
dd <- 4:7
ee <- 5:8
ff <- c(rep(NA,4))
gg <- 6:9
lst <- list(data.frame(aa,bb), data.frame(cc,dd),
data.frame(ee,ff,gg))
tatiana <- n
since you didn't supply a reproducible example, here is a test that I
ran with varying number of rows that seems to work fine. You might
want to provide at leat an "str" of the structure that you are doing
the rbind on.
> x <- lapply(1:10, function(z){
+ data.frame(a=runif(z), b=rnorm(z), c=
Douglas/R-help,
Thanks for your reply. I did try the solution but the result is not
what I expect and I also get the following warning message:
---
Warning message:
number of columns of result
is not a multiple of vector length (arg 1) in: rbind(1, c(6, 9, 10,
12,
On 4/28/07, Ajit Pawar <[EMAIL PROTECTED]> wrote:
> Greetings,
> This might be something very simple but a nice solution eludes me!!
>
>I have a function that I call within sapply that generates data frame
> in each call. Now when sapply returns me back the result - it's in the form
>
Greetings,
This might be something very simple but a nice solution eludes me!!
I have a function that I call within sapply that generates data frame
in each call. Now when sapply returns me back the result - it's in the form
of a "list of data frames". so in order to extract the infor