A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/christopherkenny/name below:

christopherkenny/name: Tools for Working with Names

name

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

You can install the current version of name from GitHub.

devtools::install_github('name')
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'))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4