You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Davis R Users' Group
Hi All,
I am getting an error on reading some .txt files because for some unknown reason my instruments occasionally record an É (note the accent) instead of a W when recording longitudes. R doesn’t like these characters because they’re non-ASCII. I get an error: multibyte string type of response. Does anyone know a workaround in R?
Alternatively, I’m working on a bash/linux fix that will seek out the non-ASCII characters and replace them. The first half of that I have figured out, but don’t know how to do the replacement part.
I’ve opened a stack overflow thread on this if you care to take a look at the data structure and my bash grep commands.
I would encourage you to work in UTF-8, R is actually fine with such
characters but not if the file says it's ASCII encoded. Though in your
case it's the wrong character.
Can you provide a small sample file for testing solutions against.
As a poster in stackexchange pointed out, iconv in R is usually part of
the solution. See the sub argument.