Skip to content

Instantly share code, notes, and snippets.

@nassimhaddad
Created January 26, 2013 18:13
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nassimhaddad/4643587 to your computer and use it in GitHub Desktop.
Save nassimhaddad/4643587 to your computer and use it in GitHub Desktop.
remove non-ascii characters
# remove non-ascii characters
df$text <- gsub("[^\x20-\x7E]", "", df$text)
@dlazarou
Copy link

nice job. I was trying for something equivalent.

@lp5510
Copy link

lp5510 commented Feb 22, 2018

That looks good - I will give it a try

@matthewpaulking
Copy link

Thanks for this! Worked perfectly for sanitizing some GPS coordinates.

@rkp600
Copy link

rkp600 commented Jun 3, 2018

Worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment