Sorry, there was a stupid cut & paste mistake (missing parentheses in return statement...)
ConvertMissingToNA <- function(values)
{
values[values == -9999 | values == -999999] <- NA
return(values)
}
Peter
______________________________________________
[email protected] 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.

