[R] timeseries aggregation by event (zoo, hydrostat, plyr ?)

2015-01-30 Thread Bastian Pöschl
hallo, i search for a possibillity to aggregate a time series by non regular periods (events) As an example i have a precipitation time series ## generate some smooth timeseries library(zoo) library(hydrostats) ## some example data ## ## ## ## x.pr - c(0, 0, 0, 0.2, 0.8, 0.7, 0, 0, 0, 0.6,

Re: [R] Time Series

2014-06-03 Thread Bastian Pöschl
It would be great to get a detailed question. As far as I understood you wanted to plot your series in a single frame. There are plenty examples in the help of plot.ts and plot.zoo for that. I prefer working with time series be using the zoo package. But most things can also be done within ts.

Re: [R] Zoo: How to match secondary Y-axis ticks to primary ones

2014-05-28 Thread Bastian Pöschl
Thank you for the quick reply, your advice wasn't exactly what I was looking for. The plot 1 of the example was ment to show my problem: the secondary axis has it's first tick at the intersection with the x-axis whereas the primary y-axis shows a nice little offset. Using your advice i copied

Re: [R] Zoo: How to match secondary Y-axis ticks to primary ones

2014-05-28 Thread Bastian Pöschl
Thank you, this is the solution. I just replaced at4/20 by seq(0, max.yl, length.out=par(yaxp)[3]+1) so it should work with any scale. here is the final code that worked for me: ## R-Help 2014-05-28 asked by Bastian Pöschl solved by Gabor Grothendieck library(zoo) ## generate some smooth

Re: [R] Zoo: How to match secondary Y-axis ticks to primary ones

2014-05-28 Thread Bastian Pöschl
Sorry the last post has got a mistake, here is the corrected version: ## R-Help 2014-05-28 asked by Bastian Pöschl solved by Gabor Grothendieck library(zoo) ## generate some smooth timeseries x1 - c(38.2, 18.1, 83.2, 42.7, 22.8, 48.1, 81.8, 129.6, 52.0, 110.3) x2 - c(2.2, 0.8, 0.7, 1.6, 0.9,

Re: [R] Zoo: How to match secondary Y-axis ticks to primary ones

2014-05-28 Thread Bastian Pöschl
To get 0.5 Ticks the script was corrected another time ;) ## R-Help 2014-05-28 asked by Bastian Pöschl solved by Gabor Grothendieck library(zoo) ## generate some smooth timeseries x1 - c(38.2, 18.1, 83.2, 42.7, 22.8, 48.1, 81.8, 129.6, 52.0, 110.3) x2 - c(2.2, 0.8, 0.7, 1.6, 0.9, 0.9, 1.1, 2.8

[R] Zoo: How to match secondary Y-axis ticks to primary ones

2014-05-27 Thread Bastian Pöschl
Hallo, i try to draw a plot (plot.zoo) with a secondary y-axis. Further I want to draw reference lines. Unfortunately I do not manage to get control on the ticks, so that the reference lines match both- primary and secondary y-axis. Maybe someone already solved this problem?? It would be great.

[R] barplot at specific x values

2009-11-12 Thread Bastian Pöschl
Dear useRs, I search for a possibillity to plot stacked bars at specific x positions. I tried and tried, but the only way i got something adequate was by using lowlevel plots segments(). That is quiet ok, but will not please eyes without a lot of par() lines.

[R] read and reshape time series table with empty items

2009-02-25 Thread Bastian Pöschl
;0.9;0.0;1.6;2.8;0.0;0.0;NA;NA 1980;31;NA;;NA;;1.1;;0.0;2.2;;0.0;;NA I hope someone has got experience with such data format and can help me. Thank you very much Bastian Pöschl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] extract certain months toyears (zoo)

2009-01-23 Thread Bastian Pöschl
Dear useRs and developeRs, In my diploma thesis I work with a daily time series of glacier runoff data. I did already aggregate them to monthly means etc. Now i want to use just the summer values (I am indecisive by now what that means, but let's make it easy and use months like June). Is there