README.md

name

R-CMD-check name status
badge Lifecycle:
stable CRAN
status CRAN downloads

Organizes functions for consistent column naming for tibbles and data.frames.

Installation

You can install the released version of name from CRAN with:

install.packages('name')

You can install the current version of name from GitHub.

pak::pak('christopherkenny/name')

Example

library(name)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
data(mtcars)

We can add a prefix:

mtcars <- mtcars %>% 
  rename_with(\(x) add_pref(x, 'pref_'))

And similarly a suffix:

mtcars <- mtcars %>% 
  rename_with(\(x) add_suff(x, '_suff'))

Or a replace a phrase:

mtcars <- mtcars %>% 
  rename_with(\(x) repl_phrase(x, '_hp', '_hitpoints'))


Try the name package in your browser

Any scripts or data that you put into this service are public.

name documentation built on Sept. 9, 2025, 5:35 p.m.