Learn R Programming

name

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'))

Copy Link

Version

Install

install.packages('name')

Monthly Downloads

304

Version

0.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Christopher T. Kenny

Last Published

September 3rd, 2025

Functions in name (0.0.2)

sort_phrase

Sort by Phrase
list_phrase

List Phrases
list_pref

List Prefixes
add_pref

Add Prefix
rem_phrase

Remove Phrase
add_suff

Add Suffix
compare_names

Compare the Names of Two Objects
rem_pref

Remove Prefix
reexports

Objects exported from other packages
relocate_with

Relocate columns
list_suff

List Suffixes
sort_suff

Sort by Suffix
repl_pref

Replace Prefix
repl_phrase

Replace Phrase
rename_with_loud

Rename with, but Loudly
rem_suff

Remove Suffix
repl_suff

Replace Suffix
sd

South Dakota Election and Demographic Data
sort_pref

Sort by Prefix