ProjectTemplate (version 0.10.4)

clean.variable.name: Translate a file name into a valid R variable name.

Description

This function will translate a file name into a name that is a valid variable name in R. Non-alphabetic characters on the boundaries of the file name will be stripped; non-alphabetic characters inside of the file name will be replaced with dots.

Usage

clean.variable.name(variable.name, config = .load.config())

Value

A translated variable name.

Arguments

variable.name

A character vector containing a variable's proposed name that should be standardized.

config

A list of configuration variables. Defaults to those loaded by load.project

Examples

Run this code
library('ProjectTemplate')

if (FALSE) clean.variable.name('example_1')

Run the code above in your browser using DataLab