Created
September 4, 2010 02:13
-
-
Save bds/564825 to your computer and use it in GitHub Desktop.
Return domain string for #rstats dataframe of email addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For an R dataframe that has a column of email | |
# addresses, e.g. [email protected], 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