[R-sig-finance] fBasics / timeSeries() - memory issue?
Dirk Eddelbuettel
edd at debian.org
Wed Dec 29 19:53:28 CET 2004
On Wed, Dec 29, 2004 at 01:14:16PM -0500, Adam Klein wrote:
> Hi all,
>
> I'm new to R and using R v2.0.0 and fBasics 200.10058, and trying to construct a timeSeries from a data frame (it's a currency total return index). I'm wondering if there are memory-related issues because I can only load 7567 dates into memory across 51 countries; but when I try to load 7568 periods I get an error:
>
> > len
> [1] 7567
> > myTS <- timeSeries(recs[1:len,2:51], recs[1:len,1], units=names(recs)[2:51]) # THIS WORKS
> > len<-len+1
> > len
> [1] 7568
> > myTS <- timeSeries(recs[1:len,2:51], recs[1:len,1], units=names(recs)[2:51]) # THIS DOESN'T WORK
> Error in if (timeTest == 0) iso.format = "%Y-%m-%d" :
> missing value where TRUE/FALSE needed
>
> Does anyone think this might be a memory issue? How could I check?
In my experience this is almost always due to an irregular data field. I'd
check that line in the input, i.e.
recs[7568,1:51]
as I suspect that recs[7568,1] may simply have a format different from
%Y-%m-%d.
Hth, Dirk
> The recs data frame looks like this ...
>
> > str(recs)
> `data.frame': 8867 obs. of 51 variables:
> $ TIME: chr "1970-12-31 16:00:00" "1971-01-01 16:00:00" "1971-01-04 16:00:00" "1971-01-05 16:00:00" ...
> $ AR : num NA NA NA NA NA NA NA NA NA NA ...
> $ AU : num NA NA NA NA NA NA NA NA NA NA ...
> $ BD : num NA NA NA NA NA NA NA NA NA NA ...
> $ BG : num NA NA NA NA NA NA NA NA NA NA ...
> $ BR : num NA NA NA NA NA NA NA NA NA NA ...
> ...
>
> Thanks!
>
> --Adam
>
>
>
>
>
> Disclaimer: This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please notify the sender immediately and destroy/delete this e-mail. You are hereby notified that any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly prohibited.
>
> This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All information contained in this communication is not warranted as to completeness or accuracy and is subject to change without notice. Any comments or statements made in this communication do not necessarily reflect those of AQR Capital Management, LLC and its affiliates.
>
> _______________________________________________
> R-sig-finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
--
If you don't go with R now, you will someday.
-- David Kane on r-sig-finance, 30 Nov 2004
More information about the R-sig-finance
mailing list