namify: Converts hogwash variable names to proper variable names.

View source: R/namify.R

namifyR Documentation

Converts hogwash variable names to proper variable names.

Description

Converts hogwash variable names to proper variable names.

Usage

namify(x)

Arguments

x

A character vector or a data.frame

Details

The following changes are made to the text

  • Change . to _

  • Remove leading/trailing spaces, (, )

  • Change % to pct

  • Change interior space to underscore

  • Change all characters to lower case

  • Remove punctuation

  • If text begins with number, prefix with n

Examples

df_with_proper_variable_names <- namify(iris)

thomasgstewart/tgsify documentation built on Oct. 26, 2024, 8:15 p.m.