standardizeDimnames: Standardize the column and/or row names of a matrix or data...

View source: R/standardize_dimnames.R

standardizeDimnamesR Documentation

Standardize the column and/or row names of a matrix or data frame to standard syntax, defaulting to camelCase

Description

Standardize column and/or row names of a matrix or data frame to a standard syntax, defaulting to camelCase. This is a wrapper for standardize_names, to allow it to be used on data frames and matrices, rather than on their names.

Usage

standardizeDimnames(
  x, cols = TRUE, rows = FALSE, dedup = TRUE, case = "camelCase")

Arguments

x

data frame or matrix with column and/or row names to be standardized

cols, rows

logical, whether to standardize the column and row names, respectively. By default, column names are standardized, but row names are not.

dedup

logical, whether to deduplicate the vector elements. If TRUE, elements that are identical after standardization are deduplicated by appending "_1", "_2", etc. Defaults to TRUE.

case

character, specifying whether to convert to camelCase or snake_case. Abbreviations are accepted. Defaults to camelCase.

Value

an object of the same type and dimension as x


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.