na.check2: Basic info on each col of data.frame - testing faster way,...

View source: R/na.check2.R

na.check2R Documentation

Basic info on each col of data.frame - testing faster way, but returns text

Description

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 this version fails to handle fields that are factor class!?

Usage

na.check2(df)

Arguments

df

Matrix or data.frame to examine. Cannot be a single vector currently.

Value

Returns a vector of results, one per col of df

See Also

matrixStats::signTabulate() minNonzero() and experimental variations on na.check: na.check() na.check2()

@export

Examples

## 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)

ejanalysis/analyze.stuff documentation built on April 2, 2024, 10:10 a.m.