timeSeries - Error in cbind function
Yohan Chalabi
chalabi at phys.ethz.ch
Thu Aug 12 11:02:10 CEST 2010
Hi Thomas,
Thank you for your report.
I have updated the cbind method on R-forge which should fix the issue.
Regards,
Yohan
On Aug 12, 2010, at 9:52 AM, Thomas Etheber wrote:
> Hello,
>
> hopefully I am sending the following bug-report to the correct mail adress.
> I found the following bug, with the cbind function in the timeSeries package.
> Whenever there is just a single data point in the timeSeries the cbind with other timeSeries objects fails.
>
> Regards,
> Thomas
>
> > library(timeSeries)
> > a <- timeSeries(1, as.Date(1, origin="2010-01-01") )
> > a
> GMT
> TS.1
> 2010-01-02 1
> > b <- timeSeries( 2:3, as.Date(1:2, origin="2010-01-01") )
> > b
> GMT
> TS.1
> 2010-01-02 2
> 2010-01-03 3
>
> ##################################################
> > cbind(a, b)
> Fehler in cbind(deparse.level, ...) : number of rows must match
> ##################################################
>
> > d <- timeSeries( 2:10, as.Date(2:10, origin="2010-01-01") )
> > d
> GMT
> TS.1
> 2010-01-03 2
> 2010-01-04 3
> 2010-01-05 4
> 2010-01-06 5
> 2010-01-07 6
> 2010-01-08 7
> 2010-01-09 8
> 2010-01-10 9
> 2010-01-11 10
>
> > cbind(b,d)
> GMT
> TS.1.1 TS.1.2
> 2010-01-02 2 NA
> 2010-01-03 3 2
> 2010-01-04 NA 3
> 2010-01-05 NA 4
> 2010-01-06 NA 5
> 2010-01-07 NA 6
> 2010-01-08 NA 7
> 2010-01-09 NA 8
> 2010-01-10 NA 9
> 2010-01-11 NA 10
> >
>
> _______________________________________________
> Rmetrics-core mailing list
> Rmetrics-core at r-project.org
> https://stat.ethz.ch/mailman/listinfo/rmetrics-core
>
--
PhD candidate
Swiss Federal Institute of Technology
Zurich
www.ethz.ch
More information about the Rmetrics-core
mailing list