I want to split a column containing emailaddresses at the "@".
d$domain<-strsplit( d$email, "@")[[1]]
Does not work. What is the correct way to do this?
str_split_fixed
from the stringr
package makes this easy:
library(stringr)
str_split_fixed(d$email, "@", n = 2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With