na.check | R Documentation |
Returns basic information on each field in a data.frame, like count of rows that are zero, negative, NA, infinite, etc.
Slow - work in progress Leaves out logical, complex?, character, etc. cols
na.check(df, zone, min.text = FALSE)
df |
Matrix or data.frame to examine. Cannot be a single vector currently. |
zone |
optional. if zone (subgroups) specified, just returns total count and count of NA values – in each subgroup for each field. |
min.text |
Logical, optional, defaults to FALSE. If TRUE, tries to find minimum of numbers stored as text? Slows it down. |
Returns a vector of results, one per col of df But if zone (subgroups) specified, just returns count of NA values in each subgroup for each field.
matrixStats::signTabulate()
minNonzero()
and
experimental variations on na.check: na.check()
na.check2()
## Not run:
system.time(x = na.check(data.frame(a = -1:1e6, b = 'text', c = c(NA, 1, 2)), min.text = FALSE) )
system.time(x = na.check2(data.frame(a = -1:1e6, b = 'text', c = c(NA, 1, 2)), min.text = TRUE) )
na.check(data.frame(a = -1:10, b = 'text', c = c(NA, 1, 2)))
na.check2(data.frame(a = -1:10, b = 'text', c = c(NA, 1, 2)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.