colComb: combine columns

View source: R/clean_datasets.R

colCombR Documentation

combine columns

Description

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.

Usage

colComb(xx, oldcols, newcolname, merge.fun = "mean")

Arguments

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".

Details

This code is written by Eric.

Value

a merged column in the same dataset as given as input.


allanecology/multiFunBetadivLuiGDM documentation built on Nov. 12, 2023, 6:16 a.m.