is.na.xts: Perform is.na About an xts Object

Description Usage Arguments Value Examples

View source: R/Functions.R

Description

1
2
Without this function, is.na(xts) strips the index.
Probably this function should be an xts enhancement.

Usage

1
2
## S3 method for class 'xts'
is.na(x, ...)

Arguments

x

xts object

...

dots passes

Value

xts object of T/F values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 

is.na.xts(Perform is.na About an xts Object) examples

xts(c(NA_real_, 0, NA_real_), zoo::as.Date(0:2))

           [,1]
1970-01-01   NA
1970-01-02    0
1970-01-03   NA

is.na(xts(c(NA_real_, 0, NA_real_), zoo::as.Date(0:2)))

            [,1]
1970-01-01  TRUE
1970-01-02 FALSE
1970-01-03  TRUE

NOTE
is.na(xts::xts(matrix(c(NA_real_, 0, NA_real_,0), ncol = 2), zoo::as.Date(0:1)))
            V1na  V2na
1970-01-01  TRUE  TRUE
1970-01-02 FALSE FALSE


## End(Not run)

AndreMikulec/econModel documentation built on June 30, 2021, 9:48 a.m.