create.variable.name: Create variable name from string.

View source: R/utilities.R

create.variable.nameR Documentation

Create variable name from string.

Description

This function creates a sensible variable name by replacing all non-alphanumeric characters with underscores. This is useful when the string is to be used as a the name of a list element.

Usage

create.variable.name(s)

Arguments

s

The string to be used as a variable name

Value

The string with non-alphanumeric characters replaced by underscores

Examples

s <- "a-b"
edf:::create.variable.name(s)

edf documentation built on Aug. 31, 2026, 5:08 p.m.