Description Usage Arguments Value See Also Examples
frenum_miss() will replace certain values with NA. For numeric vectors
ids coded as 0 or -99 will be considered as missing or unknown. For
character vectors this is extended to include '.', '*', 'NA' and ' '.
1 | frenum_miss(id)
|
id |
a numeric or character vector for which the missing codes will be replaced with NA |
a numeric or character vector
renum_miss() which is the R implementation of the same
1 2 3 4 5 6 7 | set.seed(42L)
ids <- rpois(50, 100)
ids[sample.int(50, 10)] <- c(0L, -99)[sample.int(2, 10, replace = TRUE)]
frenum_miss(ids)
ids <- c("A", "B", ".", "D", "*", "NA", " ", " ", "K")
frenum_miss(ids)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.