qcombine | R Documentation |
Quickly combine columns (summed) and rename.
qcombine(mat, combined.columns, elim.old = TRUE)
mat |
A matrix or dataframe with numeric combine columns. |
combined.columns |
A list of named vectors of the colnames/indexes of the numeric columns to be combined (summed). If a vector is unnamed a name will be assigned. |
elim.old |
logical. If |
Returns a dataframe with combines columns.
transform
## Not run:
A <- list(
a = c(1, 2, 3),
b = qcv(mpg, hp),
c = c("disp", "am")
)
B <- list(
c(1, 2, 3),
d = qcv(mpg, hp),
c("disp", "am")
)
qcombine(head(mtcars), A)
qcombine(head(mtcars), B)
qcombine(head(mtcars), B, elim.old = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.