Skip to content

Instantly share code, notes, and snippets.

@bds
Created September 4, 2010 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bds/564825 to your computer and use it in GitHub Desktop.
Save bds/564825 to your computer and use it in GitHub Desktop.
Return domain string for #rstats dataframe of email addresses
# For an R dataframe that has a column of email
# addresses, e.g. joe@example.com, return just
# the domain name
sapply(strsplit(my.df$email, "@"), "[", 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment