# NOT RUN {
cleanText("Bernardo Lares 123")
cleanText("B<U+00E8>rn<U+00E4>rdo L<U+00E1>reS 123", lower = FALSE)
cleanText("Bernardo Lare$", spaces = ".", ascii = FALSE)
cleanText("\\@<U+00AE><U+00EC><U+00F7><U+00E5> %<U+00F1>S ..-X", spaces = FALSE)
cleanText(c("mar<U+00ED>a", "<U+20AC>", "n<U+00FA><U+00F1>ez_a."), title = TRUE)
df <- dft[1:5, 1:6] # Dummy data
colnames(df) <- c("ID.", "34", "x_2", "Num 123", "N<U+00F2>n-<U+00E4>sc<U+00EC>", " white Spaces ")
print(df)
cleanNames(df)
cleanNames(df, lower = FALSE)
# }
Run the code above in your browser using DataLab