Description Usage Arguments Details Value Author(s) References Examples
xts method replace ‘NA’ with most recent non-‘NA’
1 2 |
object |
an xts object |
na.rm |
logical. Should leading/trailing ‘NA’'s be removed?
The default for xts |
fromLast |
logical. Cause observations to be carried backward rather
than forward. Default is |
maxgap |
runs of more than ‘maxgap’ will retain ‘NA’s after the
maximum gap specified. See |
... |
unused |
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.
See the documentation in zoo.
Jeffrey A. Ryan
‘zoo’
1 2 3 4 5 6 7 |
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
[,1]
2017-07-22 NA
2017-07-23 NA
2017-07-24 3
2017-07-25 4
2017-07-26 NA
2017-07-27 6
2017-07-28 7
2017-07-29 8
2017-07-30 NA
2017-07-31 NA
[,1]
2017-07-22 NA
2017-07-23 NA
2017-07-24 3
2017-07-25 4
2017-07-26 4
2017-07-27 6
2017-07-28 7
2017-07-29 8
2017-07-30 8
2017-07-31 8
[,1]
2017-07-22 3
2017-07-23 3
2017-07-24 3
2017-07-25 4
2017-07-26 6
2017-07-27 6
2017-07-28 7
2017-07-29 8
2017-07-30 NA
2017-07-31 NA
[,1]
2017-07-22 3
2017-07-23 3
2017-07-24 3
2017-07-25 4
2017-07-26 6
2017-07-27 6
2017-07-28 7
2017-07-29 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.