clean_column_names: clean up superfluous characters in column names

Description Usage Arguments Details Value

View source: R/fun-clean_column_names.R

Description

Remove gate and object names from column names. Some reformatting to make them easier to read.

Usage

1
clean_column_names(x, gate = "dummy", object = "Main")

Arguments

x

a data frame

gate

gate name to be cleared, given as a regular expression; defaults to "dummy", which does nothing, unless there is a gate called "dummy"

object

name of object to be cleared; defaults to "Main"

Details

ScanR export files are tab delimited tables whose columns contain the name of the object, the gate it belongs to, the parameter in question and the measure being exported, e.g. mean or error. The names are cumbersome and when loaded with check.names = TRUE, they can be quite confusing. Usually most of these can be removed without any percievable loss.

This is a simple stream of gsub calls that removes superfluous information from the column names. It also improves the formatting. make.names is run first.

Value

data frame with modified column names


olobiolo/acutils documentation built on Nov. 28, 2021, 9:35 p.m.