Re: [R] Help with a code in R

2016-09-07 Thread Mark Sharp
me(forecast_nal,fct) > } > else > { > > fit <- tbats(y) > fcb <- forecast(fit, h = 16) > dates <- attr(fcb$mean, "tsp") > datecol <- seq(from=dates[1], to=dates[2], by=1/dates[3]) > fct<-cbind.data.frame(s,datecol,Point=fcb$mean) >forecast_

Re: [R] Help with a code in R

2016-09-07 Thread Erika Rocío Espinosa Balbuena
GMT-05:00 PIKAL Petr : > Hi > > > > see in line > > > > *From:* Erika Rocío Espinosa Balbuena [mailto:erika...@gmail.com] > *Sent:* Tuesday, September 6, 2016 10:52 PM > *To:* PIKAL Petr > *Cc:* r-help@r-project.org > *Subject:* Re: [R] Help wit

Re: [R] Help with a code in R

2016-09-07 Thread PIKAL Petr
Hi see in line From: Erika Rocío Espinosa Balbuena [mailto:erika...@gmail.com] Sent: Tuesday, September 6, 2016 10:52 PM To: PIKAL Petr Cc: r-help@r-project.org Subject: Re: [R] Help with a code in R Hi Erika Yes the objetcs have the same structure, and forecast_nal is the variable where I a

Re: [R] Help with a code in R

2016-09-07 Thread Erika Rocío Espinosa Balbuena
e you sure that in each cycle your rbinded or cbinded objects have > the same size? > > Cheers > Petr > > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erika > Rocío > > Espinosa Balbuena > > S

Re: [R] Help with a code in R

2016-09-06 Thread Bert Gunter
?traceback ?debug ?trace R has built-in debugging tools. Learn to use them. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Sep 5, 2016 at 1

Re: [R] Help with a code in R

2016-09-05 Thread PIKAL Petr
binded or cbinded objects have the same size? Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erika Rocío > Espinosa Balbuena > Sent: Monday, September 5, 2016 8:26 PM > To: r-help@r-project.org > Subject: [R] Help wit

Re: [R] Help with a code in R

2016-09-05 Thread Mark Sharp
Erika, You have failed to supply reproducible code. I do not all that is missing, but a glance shows that you did not include the code to load the foreach package or a definition of the objects named comb and b. It is very likely you will receive assistance if you can follow the posting guide

[R] Help with a code in R

2016-09-05 Thread Erika Rocío Espinosa Balbuena
Hi, I am working with this code: forecast_nal<-data.frame() out<-vector() x<-foreach(i=1:nrow(comb)) %do% { s<-comb[i,'prod_id'] #Familia+Sumbarca+prod_id #Serie bcomb1<-b bcomb1<-subset(bcomb1,bcomb1$prod_id == s & bcomb1$year <= 2015) bcomb1<-arrange(bcomb1,year,week) a<-bcomb1[1:1,'week'] d