View source: R/clean_datasets.R
colComb | R Documentation |
This function combines columns. It creates a new column which is the mean (or any given function) of several columns. The old columns are deleted. It can be used e.g. to combine data from several years.
colComb(xx, oldcols, newcolname, merge.fun = "mean")
xx |
input file |
oldcols |
names of the columns to be combined, given as a vector |
newcolname |
the name which the newly generated, combined column should have |
merge.fun |
the name of the function to be used for column combination. e.g. "mean". |
This code is written by Eric.
a merged column in the same dataset as given as input.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.