Description Usage Arguments Details Value Author(s) See Also
field_case
is a versatile function that accepts tabular data with column
headers or field names and modifies their case, separators and, for special
cases, initial letter capitalization.
1 | field_case(data, case = "lower", sep = "_", lower.case = TRUE)
|
data |
A |
case |
A single character string in quotations specifying the case in which
column headers or field names will convert. Acceptable parameters include |
sep |
A single character string in quotations specifying the character(s)
used to separate words in column headers or field names. Defaults to a
single space, i.e. Conflicting parameters passed to |
lower.case |
A logical value ( Conflicting parameters passed to |
field_case
automatically formats field names to all lowercase letters
and underscore separators (_
). However, it supports both "lower", "upper",
and "title" cases, exotic cases such as "camel", "kebab", "snake", and "leopard",
and custom separators where applicable.
Objects passed to argument data =
that are not tabular or, if
comprised of a single column, without column names will throw an error.
A data.frame
object or other tabular data structure with a modified
case and separators in column headers and field names specified by the user.
Jamison R. Crawford, Institutional Research Associate, Georgia State University
gsub
, names
, colnames
, ncol
, tolower
,
toupper
, toTitleCase
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.