[R] IF LOOOP

2017-06-13 Thread matthias worni
Hey This should be a rather simple quesiton for some of you. I want to make some progress in looping... I have the vector r, which contains single values --> see below: r [1] 1.1717118 1.1605215 1.1522907 1.1422830 1.1065277 1.1165451 1.1163768 1.1048872 1.0848836 1.0627211 [11] 1.0300964 1.02

[R] (no subject)

2016-01-08 Thread Matthias Worni
Thank you for the help. It worked out fine. However trying to add additional aesthetics I came to another point, where I couldnt figure out a way to solve it. Perhaps you run into similar problems since your familiar with the ggplot package. The code is the following: runmean_10yr_Nino_3_Index_17

[R] hello everyone and happy new year

2016-01-06 Thread Matthias Worni
I got the following problem in R studio. Im trying to make a plot of different time series using different colours, which so far worked finde with the ggplot tool. However I did not manage to accually write a name to the correct layers. Below you can see the code that I wrote and also woks. Remembe

[R] Compute Regressions with R-Function

2015-11-12 Thread Matthias Worni
Hello I was trying to set up a function() that allows easely to calculate regressions for severel dependent variables with the same independent variables. My function looked like this but was turned down by an error (Im quiet new to R Studio). So here is my solution: b CO2 logTrop_Aerosol lm(b ~