[R] GGplot2 stat_summary

2016-08-17 Thread maettuw
Hello guys I have a melted dataset that has 36 different time series included. With stat.summary() I added the mean. The problem is that these 36 time series do not have the same length. Therefore I would like to plot the mean only for the length that the shortest of these 36 time series has. E

[R] Summing up layers

2016-07-19 Thread maettuw
Hello everyone I have gridded output data from a climate model. I would like to take the average of these grids and plot them. I have tried to plot it with gglot or image.plot (field/raster package). I have to do this extensively meaning that a manual way is not what I am looking for. My data h

[R] Storing output of loop into list()

2016-04-07 Thread maettuw
Hello. I am trying to store the output from a loop into a matrix. Failed so far, thanks for the help. What I want to store into a new matrix: (just run the code once): temps<-rnorm(400,14,0.05) ttind<-NULL for(ti in 1:(length(temps)-9)) { if(temps[ti]-temps[ti+9] >= 0.1 && max(temps[ti]-temps[

[R] Extracting windows from time series

2016-04-06 Thread maettuw
Dear R Users Thanks for the help in advance and lets get straight to the problem: I have a 400 year long temperature time series and I am looking for decades that show a linear trend decrease of approximately -0.1 Kelvin or degrees. --> What I would like to program: A loop/function / command lin