grepColNA: Get attributes of data.frame which contain NAs

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/extract.R

Description

Get attributes of data.frame which contain NAs.

Usage

1

Arguments

x

data.frame

...

Arguments passed to further functions

Details

If the input is a vector, grepColNA() indicates if NAs are present. If the input is a data.frame, grepColNA() returns the colums which contain NAs.

Value

Column names which values contain NAs or indication about NAs.

Note

under continuous developement

Author(s)

Roland Rapold

References

none

See Also

grepColEntries grepColNames grepObjNames grepNotCompleteEntries grepMultipleEntries grepRowNames grepColNegNum grepColFactors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
if(require("MASS"))
{
    # load example data
    data(crabs, package="MASS")
    head(crabs)
    print(grepColNA(crabs))
    tt <- crabs
    tt[122,2] <- NA
    tt[22, 4] <- NA
    print(grepColNA(tt))
    print(grepColNA(c(pi, NA, 4.000000, 5.000000, 5, 6, 5, 6)))
}

rrMisc documentation built on June 25, 2021, 3 a.m.