I have a big data set which I cleaned up and found that one of the fields has value like
"My son is turning into a monster \xf0\u009f\u0098\u0092"
I am not able to create this simple data as it gives the below mentioned error
a <- c('My son is turning into a monster \xf0\u009f\u0098\u0092')
Error: mixing Unicode and octal/hex escapes in a string is not allowed
Now suppose I have this value in my variable and want to remove all non-ascii characters like
library(stringi)
b <- stri_trans_general(a, "latin-ascii")
and now want to converted text in the lower format
tolower(b)
I am getting below mentioned error
Error in tolower(b) : invalid input 'My son is turning into a monster 😒' in 'utf8towcs'
Can someone please help me to understand the issue