Skip to content
Prev 207919 / 398502 Next

Error on using lag function

Does this help:

library(zoo)
na.locf(P, fromLast=TRUE)

You'll have to decide what to do if the last value is NA.

  -Peter Ehlers
anna wrote: