Hi,
I have a data frame with each column representing a separate site.
Following this code, I can apply acf to all columns in A. 'A' contains randomly 
generated data.

A <- matrix(rnorm(1500),nrow=500)
par(mfrow=c(ncol(A),1))

lapply(split(A,col(A)), acf)

#OR
lapply(split(A,col(A)), function(snow) acf(snow, lag.max=5))


Problem: Some of my data contains 'NA' in some of the columns. I get this error
"Error in na.fail.default(as.ts(x)) : missing values in object"
How can I resolve this problem?

Thanks.
AE.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to