[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

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:

Re: [R] Challenge extracting months

2017-02-01 Thread Kwesi Quagraine
n.t1)) { > if(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

Re: [R] Challenge extracting months

2017-01-30 Thread Kwesi Quagraine
> collapse_values<-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(te

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 <dwinsem...@comcast.net> wrote: > > > On Jan 30, 2017, at 4:53 AM, Kwesi Quagraine <starskykw...@gmail.com> > wrote: > > > > Hello, I have a data with two variables nodes and ind

Re: [R] (no subject)

2017-01-30 Thread Kwesi Quagraine
this helps. > > Bob > > > On 1/30/2017 9:11 AM, Kwesi Quagraine wrote: > >> 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

Re: [R] (no subject)

2017-01-30 Thread Kwesi Quagraine
; > Probably just a small correction. > > 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 > >

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

[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;

[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