Skip to contents

Prepared covariates often have special characters in their variable names which can or can not be used in formulas or cause errors for certain procedures. This function converts special characters (points, underscores or similar) of variable names into a species format.

Usage

misc_sanitizeNames(names)

Arguments

names

A vector of character vectors to be sanitized.

Value

A vector of sanitized character.

Examples

# Correct variable names
vars <- c("Climate-temperature2015", "Elevation__sealevel", "Landuse.forest..meanshare")
misc_sanitizeNames(vars)
#>  Note: Method deprecated. Just janitor::make_clean_names() directly!
#> [1] "climate_temperature2015"  "elevation_sealevel"      
#> [3] "landuse_forest_meanshare"