On Mon, Aug 31, 2009 at 6:09 AM, Bunny, lautloscrew.com<bu...@lautloscrew.com> wrote: > Dear all, > > Finally, I made it, my RPostgreSQL works. After working through some > tutorials, i was able to plot, get and replace several timeseries. > > > Still I miss the opportunity (syntax) to add data. Most tutorials are > about: "Download some S&P data from Yahoo and play around a little". > What I want to do is, add data to an existing timeseries. Is there a > possibility to add data ? > > For example if I have something like > > z <- ts(rnorm(10), start = c(1990, 1), frequency = 1) > seriesNames(z) <- "vec" > > I want to add the next 10 years, like > > z <- ts(rnorm(10), start = c(2000, 1), frequency = 1) > seriesNames(z) <- "vec" > > > > If I use something TSreplace the new series starting at 2000 just > replaces the existing one instead of just adding another. Is there any > possibility to add data without reading the whole database into R ? > > > > thx in advance > > matt > > P.S.: some basic TS manipulating manuals are highly appreciated, its > just that i found the more sophisticated ones so far. > [[alternative HTML version deleted]] >
How about something like rbind( OLD_Data, NEW_Data ) As long as the data has the same number of columns (Yahoo data will, or should) then something like this should work. I use it with data from TradeStation but there I have total control of what goes into R. If you are not 100% sure of non-overlapping data then you might want to check for duplicates. Hope this helps, Mark ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.