Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread phani kishan
oject.org > Subject: Re: [R] Applying forecast functions to columns in a data frame > > Simple operations like mean etc. can be applied > using lapply but not statistical functions. > > --NONSENSE! > > func <- function(x){ >##write any function y

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread Bert Gunter
functions to columns in a data frame Simple operations like mean etc. can be applied using lapply but not statistical functions. --NONSENSE! func <- function(x){ ##write any function you like z <- sin(x^2-2)+rnorm(length(x)) lm(z~ seq(along=z)) } dat <- dat

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 11:10 AM, phani kishan wrote: Hey! On Tue, Jun 22, 2010 at 8:11 PM, David Winsemius > wrote: On Jun 22, 2010, at 10:32 AM, Henrique Dallazuanna wrote: Try this: lapply(DF, auto.arima) I am getting the following error: "Error in if (PVAL == min(tablep)) warning("p-value

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread phani kishan
Hey! On Tue, Jun 22, 2010 at 8:11 PM, David Winsemius wrote: > > On Jun 22, 2010, at 10:32 AM, Henrique Dallazuanna wrote: > > Try this: >> >> lapply(DF, auto.arima) >> > I am getting the following error: "Error in if (PVAL == min(tablep)) warning("p-value smaller than printed p-value") else wa

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 10:32 AM, Henrique Dallazuanna wrote: Try this: lapply(DF, auto.arima) I cannot comment on the relative merits of auto.arima or the forecast function, but I did notice that earlier today that Gabor Grothendieck (who, I suspect, could comment knowledgeably) mentioned t

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread Henrique Dallazuanna
Try this: lapply(DF, auto.arima) On Tue, Jun 22, 2010 at 11:26 AM, phani kishan wrote: > Hey, > I have a list of 30 odd time-series (products) in columns of a data-frame. > I want to apply time-series forecasting functions across all the columns of > the data-frame in order to determine which is