INA: Perform is.na About an xts Object

Description Usage Arguments Value Examples

View source: R/Functions.R

Description

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

Usage

1
INA(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
27
28
29
30
31
32
33
34
## Not run: 

# INA(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

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

           V1ina
1970-01-01  TRUE
1970-01-02 FALSE
1970-01-03  TRUE

INA(xts::xts(matrix(c(NA_real_, 0, NA_real_,0), ncol = 2), zoo::as.Date(0:1)))
           V1ina V2ina
1970-01-01  TRUE  TRUE
1970-01-02 FALSE FALSE

explode(IBM.Open.TTR.SMA.n.2, Fun = "INA")
           IBM.Open.TTR.SMA.n.2.INA
1970-01-02                     TRUE
1970-01-05                    FALSE
1970-01-06                    FALSE
1970-01-07                    FALSE
1970-01-08                    FALSE
1970-01-09                    FALSE
1970-01-12                    FALSE

## End(Not run)

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