[R] Help on multi-line plot

2018-03-16 Thread Kwesi Quagraine
Hello R-Users I am struggling with this line plot, it might be simple but I am missing something here. First of all I want to make multiple line plots across seasons (DJF,MAM,JJA,SON) for 12 variables (here, called nodes) and fill them with the node. So that season=x-axis, node=line col and freq

Re: [R] Gaussian Filter

2017-02-07 Thread Kwesi Quagraine
Hello Catalin, you could have a look on this link first for ideas in constructing your own script. http://stackoverflow.com/questions/7105962/how-do-i-run-a-high-pass-or-low-pass-filter-on-data-points-in-r Cheers! Kwesi On Tue, Feb 7, 2017 at 9:30 PM, Bert Gunter wrote: > Please do your "homew

Re: [R] Challenge extracting months

2017-02-01 Thread Kwesi Quagraine
seas.t1[i] > seas.t1[i-1]) addyear<-addyear+12 > mon.t1[i]<-mon.t1[i] + addyear > } > for(i in 1:(max(mon.t1)-2)) { > # this gives a logical index for the rolling quarter > rq<-mon.t1 %in% i:(i+2) > } > > Each successive "rq" produced by the last loop can be u

Re: [R] Challenge extracting months

2017-01-30 Thread Kwesi Quagraine
ues<-function(x,span,FUN="mean",na.rm=FALSE) { > jump<-span-1 > newx<-rep(NA,length(x)-jump) > for(i in 1:length(newx)) > newx[i]<-do.call(FUN,list(x[i:(i+jump)],na.rm=na.rm)) > return(newx) > } > > test<-1:12 > names(test)<-month.abb

Re: [R] Challenge extracting months

2017-01-30 Thread Kwesi Quagraine
Well noted David. Thanks Kwesi On Mon, Jan 30, 2017 at 5:52 PM, David Winsemius wrote: > > > On Jan 30, 2017, at 4:53 AM, Kwesi Quagraine > wrote: > > > > Hello, I have a data with two variables nodes and index, I want to > extract > > 3 months seasons, with

Re: [R] (no subject)

2017-01-30 Thread Kwesi Quagraine
n also do multiple linear regression > with the value you assigned to the month plus the other factors that > you believe are causing a change to your data. Time is the one that comes > to my mind. You can do this with the standard R function lm. > > I hope this helps. > > Bob >

Re: [R] (no subject)

2017-01-30 Thread Kwesi Quagraine
ction. > > d3 <- embed( dta$MEI, 3) > > Cheers > Petr > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff > > Newmiller > > Sent: Monday, January 30, 2017 4:19 PM > > To: r-help@r-project.org; K

Re: [R] (no subject)

2017-01-30 Thread Kwesi Quagraine
Hello Eric, thanks for the code, it seems to do something closer to what I want. I generate JFM, FMA and so on, but it does not create the DJF at the beginning. Any thoughts on that? Kwesi On Mon, Jan 30, 2017 at 6:01 PM, Erich Subscriptions < erich.s...@neuwirth.priv.at> wrote: > Using dplyr an

[R] (no subject)

2017-01-30 Thread Kwesi Quagraine
Hello, I have a data with two variables nodes and index, I want to extract 3 months seasons, with a shift of 1 month, that is, DJF, JFM, FMA etc to OND. Was wondering how to go about it. Kindly find data sample below, data is in csv format. Any help will be appreciated. My data sample; era.

[R] Challenge extracting months

2017-01-30 Thread Kwesi Quagraine
Hello, I have a data with two variables nodes and index, I want to extract 3 months seasons, with a shift of 1 month, that is, DJF, JFM, FMA etc to OND. Was wondering how to go about it. Kindly find attached the data as csv. Any help will be appreciated. Regards, ​Kwesi​ -- Try not to become a m