An object where each NA in object is replaced by the most recent
non-NA prior to it. See na.locf() for details.
Arguments
object
An xts object.
na.rm
Logical indicating whether leading/trailing NA should be
removed. The default is FALSE unlike the zoo method.
fromLast
Logical indicating whether observations should be carried
backward rather than forward. Default is FALSE.
maxgap
Consecutive runs of observations more than 'maxgap' will
remain NA. See na.locf() for details.
...
Unused.
Author
Jeffrey A. Ryan
Details
This is the xts method for the S3 generic na.locf(). The primary
difference to note is that after the NA fill action is carried out, the
default it to leave trailing or leading NA's in place. This is different
than zoo behavior.