exclude_missing | R Documentation |
Exclude datapoints that are NA, NULL or NaN.
exclude_missing(x, .NA = T, .NULL. = T, .NaN = T, .Inf = T)
x |
(an interatable object) An object to subset based on missingness. |
.NA |
(logical scalar) Whether to exclude NA (default TRUE). |
.NaN |
(logical scalar) Whether to exclude NaN (default TRUE). |
.NULL |
(logical scalar) Whether to exclude NULL (default TRUE). |
Does not remove NA etc. recursively. See the complex list example.
x = list(1, NA, 2, NULL, 3, NaN, 4, Inf)
exclude_missing(x)
exclude_missing(x, .NA = F)
exclude_missing(x, .NULL = F)
exclude_missing(x, .NaN = F)
exclude_missing(x, .Inf = F)
#complex list
x = list(1, NA, 2, NULL, 3, NaN, 4, Inf, 1:3, c(1, NA, 3))
exclude_missing(x) #does not remove NAs recursively
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.