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

View source: R/clean.variable.name.R

clean.variable.nameR Documentation

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

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

Value

A translated variable name.

Examples

library('ProjectTemplate')

## Not run: clean.variable.name('example_1')

ProjectTemplate documentation built on July 4, 2024, 1:10 a.m.