So it seems that I should use different method for different scale of data:
hundreds of millions of rows,  kdb+ , column based database;
equal to or less than millions of rows, save and xts, binary file;
even less rows, xts and save.zoo, text file.

If write.xts could write data as binary files as well as text files, it
would be fantastic.

Thanks for all.

Wind

On Fri, Sep 25, 2009 at 10:59 PM, Jeff Ryan <jeff.a.ryan@gmail.com> wrote:

> The one issue with text based storage is that attributes are difficult
> to handle.  As attributes on xts objects (any objects) can be any
> legal R object, it requires some form of serialization to record as
> text.
>
> This is doable with dput.  Aside from Gabor's suggestion, the only way
> to save everything in an xts object is to save it in binary form via
> save/.saveRDS.  This should be portable and fast, though not obviously
> in text/human-readable form.
>
> That said, I'll add write.xts and read.xts at some point in the near
> future.
>
> Thanks,
> Jeff
>
> On Fri, Sep 25, 2009 at 9:54 AM, Gabor Grothendieck
> <ggrothendieck@gmail.com> wrote:
> > Try:
> >
> > x <- as.xts(read.zoo(...))
> > write.zoo(as.zoo(x), ...)
> >
> > On Fri, Sep 25, 2009 at 10:49 AM, Wind <windspeedo99@gmail.com> wrote:
> >> There are write.zoo() and read.zoo() in the zoo package.   But there are
> no
> >> write.xts() or read.xts() in the xts package.Since xts is so powerful
> >> manipulating historic prices, I wonder how do you save those xts.
> Write
> >> your own function like write.zoo for xts?   Or just use write.zoo and
> >> read.zoo and convert to xts again?  It seems that the attributes of xts
> >>  could not be maintained in the zoo-like way.
> >> Thanks.
> >>
> >> Wind
> >>
> >>        [[alternative HTML version deleted]]
> >>
> >> _______________________________________________
> >> R-SIG-Finance@stat.math.ethz.ch mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> >> -- Subscriber-posting only.
> >> -- If you want to post, subscribe first.
> >>
> >
> > _______________________________________________
> > R-SIG-Finance@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.
> >
>
>
>
> --
> Jeffrey Ryan
> jeffrey.ryan@insightalgo.com
>
> ia: insight algorithmics
> www.insightalgo.com
>

	[[alternative HTML version deleted]]

