New Member and Question about Time Series Data (zoo object)

8 views
Skip to first unread message

李倩雯

unread,
Mar 13, 2015, 7:06:55 AM3/13/15
to hk...@googlegroups.com
Hi all,

Glad to join this group and know some people using R in HK. I began to learn R recently and met a lot of problems. Can anyone in this group help with below question? 

Problem Description
I encountered the Error: cannot allocate vector of size 64.0 Mb when I was using read.zoo to convert a data.frame called 'origin' to zoo object named 'target'

About the Data & Code
My data frame(origin) contains 5340191 obs. of 3 variables[Data, Numeric,Character]
The code looks like
target<-read.zoo(origin,format="%m/%d/%Y",index.column=1,split=3)

SessionInfo:
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Installed memory: 4.00 GB (3.82 GB usable)
Result of memory.size() : 3812.85

I try to calculate the required memory but I don't know what are the operations in such conversion process. Therefore I have no idea if my data is too mass to handle or I was using a low efficient method. 


Best regards,
Jasmine

C.H.

unread,
Mar 13, 2015, 7:28:39 AM3/13/15
to hk...@googlegroups.com

Use object.size to determine the size of origin. Probably you didnt have much memory left after loading origin.

The character column maybe the reason for out of memory. Consider dropping it if it is not absolutely need for the entire series.

A typical solution is either get a better computer or split the data in parts (if it is okay).

Btw, we have a facebook group too.

--
You received this message because you are subscribed to the Google Groups "Hong Kong R User group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hkrug+un...@googlegroups.com.
To post to this group, send email to hk...@googlegroups.com.
Visit this group at http://groups.google.com/group/hkrug.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages