Skip to content

zoo-like classes in c++?

4 messages · Jordi Molins, Armstrong, Whit, Sean O'Riordain +1 more

#
no help files for this package which is why it's not on cran yet, but
I'm happy to walk you through whatever you need to do.

It's basically an R wrapper on top of a c++ class which implements all
the time series functions.  It uses POSIXct for dates.

http://code.google.com/p/rseries/

-Whit
This e-mail message is intended only for the named recipient(s) above. It may contain confidential information. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and delete the message and any attachment(s) from your system. Thank you.
#
Jordi,

I've been doing some work with big text files (50+mb) recently and I
thought that I could only do the work in for() loops etc... I was ok
up to a certain size then my machine just couldn't take it ran out of
memory and I had to rework my algorithm - staying in R - I work in a
corporate environment where making changes to my desktop is something
that takes weeks and I just didn't have that time on the project...
Eventually I figured out how to vectorise the calculations and on a
small file what took minutes reduced to instantaneous, and from what
was impossible took a mere 10 seconds once vectorised...

Are you really sure that it is really impossible to vectorise this?

cheers,
Sean
On 31/07/07, Jordi Molins <jordi.molins.coronado at gmail.com> wrote:
#
No, zoo does not use builtin time and date classes.  It does not
know anything about Date, chron, POSIXct, etc.  Its completely
general and only assumes that whatever classes you use are ordered
(that's the O in zoo) and have certain methods defined. See ?zoo for
more information on the methods assumed.

For example, here we are using letters as our time/date class.  The
time/date class in this example is not even numeric:
z lag(z, -1)
a 11         NA
b 12         11
c 13         12
d 14         13
e 15         14

(Actually there are a few exceptions to the above for convenience, i.e.
"yearqtr" and "yearmon" classes are provided, as.Date.numeric
is provided and read.zoo understands Date and POSIXct classes
but overall the statement that its perfectly general is correct.)
On 7/31/07, Jordi Molins <jordi.molins.coronado at gmail.com> wrote: