Learn R Programming

iNZightTools (version 2.0.1)

create_varname: Create variable name

Description

Convert a given string to a valid R variable name, converting spaces to underscores (_) instead of dots.

Usage

create_varname(x)

Value

a string, which is also a valid variable name

Arguments

x

a string to convert

Author

Tom Elliott

Examples

Run this code
create_varname("a new variable")
create_varname("8d4-2q5")

Run the code above in your browser using DataLab