col_convert: CONVERT COLUMN NAMES IN MATRIX

View source: R/networksDataPrep.R

col_convertR Documentation

CONVERT COLUMN NAMES IN MATRIX

Description

CONVERT COLUMN NAMES IN MATRIX

Usage

col_convert(M, corresp, merge.fun = "max", na.rm = TRUE)

Arguments

M

a matrix whose columns names will be changed

corresp

is data.frame with rownames as the original column names and a single column with the final column names. If more than one original column matches a final one, the function will merge values using merge.fun

merge.fun

funciton to use to merge columns. Default is max, which takes the maximum value across columns. Other possibilities are mean or min.

na.rm

is passed to merge.fun


CeresBarros/ToolsCB documentation built on Aug. 23, 2024, 4:22 p.m.