remove_constant | R Documentation |
Remove Constant Columns
remove_constant(x, ...)
## S4 method for signature 'ANY'
remove_constant(x, na.rm = FALSE)
x |
An R object (should be a |
... |
Currently not used. |
na.rm |
A |
N. Frerebeau
Other data cleaning tools:
compact()
,
count()
,
detect()
,
discard()
,
empty
,
infinite
,
keep()
,
missing
,
zero
## Create a data.frame
X <- data.frame(A = 1, B = 1:3)
X
remove_constant(X)
## Add NA
X[1, 1] <- NA
remove_constant(X)
remove_constant(X, na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.