removeInvarCol: Remove invariable columns from a data frame or matrix

Description Usage Arguments Details Value Author(s) Examples

View source: R/dfmat.R

Description

Columns with one unique value are invariable. The functions help to remove such columns from a data frame (or matrix) in order to highlight the variables.

Usage

1

Arguments

df

A data frame or matrix

Details

removeInvarCol the data frame removing invariable column(s).

isVarCol and isInvarCol are helper functions, returning a logical vector indicating the variable and invariable columns respectively.

Value

isVarCol and isInvarCol return a logical vector indicating the variable and invariable columns respectively.

removeInvarCol removes invariable columns.

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

Examples

1
2
3
4
 testDf <- data.frame(a=1:4, b=7, c=LETTERS[1:4])
isVarCol(testDf)
isInvarCol(testDf)
removeInvarCol(testDf)

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.