R - the number of lines in a line with the @ symbol
I have a list of records with IDs (some of which are usernames and some of which are email addresses). I would like to know how many email addresses. I thought an easy way to do this was to count how many lines the @ symbol contains, but I can't seem to get the function to work for that. Any help is appreciated!
Example dataset:
x <- c("1234@aol.com", "johnnyApple", "tomb@gmail.com")
+3
source to share
3 answers