rmDuplCols {Orcs} | R Documentation |
data.frame
Automatically detect and remove columns from a data.frame
based on
duplicated headers.
rmDuplCols(x, keep_first = TRUE, ...)
x |
Input |
keep_first |
A |
... |
Currently not in use. |
Revised data.frame
.
Florian Detsch
## sample data
set.seed(123)
dat <- data.frame(matrix(rnorm(28), nc = 7))
names(dat) <- c("Col1", "Col1", "Col1", "Col2", "Col3", "Col3", "Col4")
dat
rmDuplCols(dat)
rmDuplCols(dat, keep_first = FALSE)