I've seen various posts about removing special characters in R (such as this one: Remove all special characters from a string in R?), but none of the strategies have worked for my issue.
I have a transcript that I am reading in with qdap's read.transcript(). When I read in the document, it makes lines with special characters look like this:
If anyone knows how to simply change these special characters (i.e <e1><b8><9d> to e), again please feel free to update!
I have tried:
ATL1$X2 <- gsub("[^0-9A-Za-z///,.?()' ]", "", ATL1$X2)
If anyone knows how to simply change these special characters (i.e e1b89d to e), again please feel free to update
But that does not remove the special characters and also removes the !
I have also tried:
str_replace_all(ATL1$X2, "[^[:alnum:]]", " ")
If anyone knows how to simply change these special characters i e e1 b8 9d to e again please feel free to update
But that is even worse and removes all punctuation and still doesn't fix my issue.
Last, I have also tried:
iconv(ATL1$X2, from = 'UTF-8', to = 'ASCII//TRANSLIT')
If anyone knows how to simply change these special characters (i.e <e1><b8><9d> to e), again please feel free to update!
But nothing was changed here either.
In an ideal world, the output would look like:
If anyone knows how to simply change these special characters (i.e e e e to e), again please feel free to update!
Thus, the special characters are read in as what they "should" be. If this is not possible, I'd honestly be okay if it just removed the special characters (but not the other characters, like the exclamation points) and looked like this:
If anyone knows how to simply change these special characters (i.e to e), again please feel free to update!
Thank you!