field_separator: Modify Separating Characters in Field Names

Description Usage Arguments Details Value Author(s) See Also

View source: R/panthr.r

Description

field_separator accepts tabular data with column headers or field names and modifies the separating characters within the column names. Because warehouse field names are separated by underscores (_), this replaces underscores with one or more user-defined characters or metacharacters.

Usage

1
field_separator(data, sep = " ")

Arguments

data

A data.frame, matrix, or other tabular object with identifiable column headers or field names.

sep

A single character string in quotations specifying the character(s) used to separate words in the column headers or field names. Defaults to a single space, i.e. sep = " ".

Details

Objects passed to argument data = that are not tabular or, if comprised of a single column, without column names will throw an error.

Value

A data.frame object or other tabular data structure with modified separators in column headers, as specified by the user in sep =.

Author(s)

Jamison R. Crawford, Institutional Research Associate, Georgia State University

See Also

gsub, names, colnames, ncol


jamisoncrawford/panthr documentation built on March 9, 2020, 6:18 p.m.