How to Apply the make.names() Function in R (Example Code)
This tutorial demonstrates how to make syntactically valid names using the make.names function in R programming.
Exemplifying Data
x <- 1:3 # Create example vector x # [1] 1 2 3 |
x <- 1:3 # Create example vector x # [1] 1 2 3
Example: How to Apply the make.names() Function
make.names(x) # Applying make.names to vector # [1] "X1" "X2" "X3" |
make.names(x) # Applying make.names to vector # [1] "X1" "X2" "X3"