I have a large data frame with information on species (location, registration date, kingdom, class, order, gender, etc..). The column that interests me is the "scientific name".
I would like to be able to filter through this column those values that have two words and thus, get rid of the data that only have one word in this column (that would mean that I do not have the complete information about its scientific name)
I appreciate if you can help me with this. Thank you very much and greetings
Hi. So the words are separated by spaces right?
We can use str_count from stringr package to count the words, then select only the columns that have the count greater than 1.
For example: