ejemplo <- iris
names(ejemplo) <- c("Sepal Length", "Sepal@Width", "Petal Length",
"Petal\\nWidth", "Spêcies")
# c("sepal_length" "sepal_width" "petallength" "petal_nwidth" "sp_cies")
# c("Sepal_Length" "Sepal_Width" "PetalLength" "Petal_nWidth" "Sp_cies")
Run the code above in your browser using DataLab