: Re: [R] List of lists to data frame?
unlist(..., recursive = F)
Michael
On Wed, Nov 16, 2011 at 6:20 PM, rkevinbur...@charter.net wrote:
I would like to make the following faster:
df - NULL
for(i in 1:length(s))
{
df - rbind(df, cbind(names(s[i
I would like to make the following faster:
df - NULL
for(i in 1:length(s))
{
df - rbind(df, cbind(names(s[i]), time(s[[i]]$series),
as.vector(s[[i]]$series), s[[i]]$category))
}
names(df) - c(name, time, value, category)
return(df)
unlist(..., recursive = F)
Michael
On Wed, Nov 16, 2011 at 6:20 PM, rkevinbur...@charter.net wrote:
I would like to make the following faster:
df - NULL
for(i in 1:length(s))
{
df - rbind(df, cbind(names(s[i]), time(s[[i]]$series),
to the master data
frame but like I said it is *very* slow.
Kevin
-Original Message-
From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com]
Sent: Wednesday, November 16, 2011 5:26 PM
To: rkevinbur...@charter.net
Cc: r-help@r-project.org
Subject: Re: [R] List of lists to data frame?
unlist
, 2011 5:26 PM
To: rkevinbur...@charter.net
Cc: r-help@r-project.org
Subject: Re: [R] List of lists to data frame?
unlist(..., recursive = F)
Michael
On Wed, Nov 16, 2011 at 6:20 PM, rkevinbur...@charter.net wrote:
I would like to make the following faster:
df - NULL
On the face of it this looks like a job for ldply() in the plyr package
which specialises in taking things apart and putting them back together.
ldply() applies a function for each element of a list and then combine
results into a data frame
On 17 November 2011 04:53, Sarah Goslee
6 matches
Mail list logo