[R] do.call and timeSeries
Bierbryer, Andrew
abierbryer at klsdiversified.com
Tue Nov 10 21:03:08 CET 2009
Peter -
I am using 2.8.1 on linux. When I use 2.10.0 on the pc, it works, so it
must be a version issue.
> sessionInfo()
R version 2.8.1 (2008-12-22)
x86_64-pc-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.U
TF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=
C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATI
ON=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
-----Original Message-----
From: Peter Ehlers [mailto:ehlers at ucalgary.ca]
Sent: Tuesday, November 10, 2009 2:38 PM
To: Bierbryer, Andrew
Cc: r-help at r-project.org
Subject: Re: [R] do.call and timeSeries
Bierbryer, Andrew wrote:
> Does anyone know why the following code hangs on the do.call, but
works
> fine when I either comment out the require(timeSeries) or only do 2
> levels of a for loop instead of 3?
>
>
>
> Thanks,
>
>
>
> Andrew Bierbryer
>
>
>
>
>
>
>
> require(timeSeries)
>
>
>
> num <- 1
>
>
>
> x.list <- list()
>
>
>
> for ( i in 1:10 ) {
>
> for ( j in 1:20 ) {
>
> for ( k in 1:30 ) {
>
> x.list[[num]] <- cbind(num,10)
>
> num <- num + 1
>
> }
>
> }
>
> }
>
>
>
>
>
> cat('calling do.call\n')
>
>
>
> x.df <- do.call(rbind,x.list)
>
>
>
> cat('called do.call\n')
>
>
This seems like a highly unusual way to generate x.df,
but it works fine for me. No idea why this doesn't work
for you.
Here's my sessionInfo; what's yours?
> sessionInfo()
R version 2.10.0 Patched (2009-11-02 r50295)
i386-pc-mingw32
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
[3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] timeSeries_2100.84 timeDate_2100.86
>
-Peter Ehlers
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
More information about the R-help
mailing list