View source: R/remove_empties.R
remove_constant | R Documentation |
Remove constant columns from a data.frame or matrix.
remove_constant(dat, na.rm = FALSE, quiet = TRUE)
dat |
the input data.frame or matrix. |
na.rm |
should |
quiet |
Should messages be suppressed ( |
remove_empty()
for removing empty
columns or rows.
Other remove functions:
remove_empty()
remove_constant(data.frame(A=1, B=1:3)) # To find the columns that are constant data.frame(A=1, B=1:3) %>% dplyr::select_at(setdiff(names(.), names(remove_constant(.)))) %>% unique()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.