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

Example: How to Apply the make.names() Function

make.names(x)                     # Applying make.names to vector
# [1] "X1" "X2" "X3"

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top