I have a dataframe of email addresses I need to split up by address and domain. I found tidyr and its separate command, but when I run separate, I either add a dataframe to my dataframe, called "new_var," or it prints out the correctly separated data into the console.
I need the separated data to be added as new columns to my existing dataframe.
I am using something like
separate(email_data, EMAIL_ADDRESS, into=c("address","domain"), sep="@", remove=FALSE)
I need the result to add two columns to my 'email_data' DF, one named address, and one named domain.
I looked through here and elsewhere, I tried to add use paste( instead of c( , but that didn't do it.
Any help is appreciated.
Thank you !