Peter, I decided to directly remove the NA's but when I tested it yes I wrote fromLast = TRUE so I might have checked erroneously sorry and thanks again I am going to keep this in mind because I might need it at some point, I have many cases where I need to handle missing values differently.
----- Anna Lippel -- View this message in context: http://n4.nabble.com/Error-on-using-lag-function-tp1399935p1415489.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ [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.

