In a dataframe like this:
data.frame(id = c("google", "Amazon"), text1 = c("Lee erke rle "," Elrl fe"), text2 = c(" Text e2 ","text Els "))
Is there any command which can remove the spaces which are not useful/extra and convert to lower case all columns expect the first one?
Example output:
data.frame(id = c("google", "Amazon"), text1 = c("lee erke rle","elrl fe"), text2 = c("text e2 ","text els"))