Reputation: 469
I would like to remove substring " - Homo sapiens (human)"
from a list of strings using gsub(.)
function. I think I need to convert it to a regular expression But I do not know how to do it. I appreciate if anyone could help me.
Thanks.
Upvotes: 0
Views: 119
Reputation: 54237
Try
gsub(" - Homo sapiens (human)", "", x, fixed = TRUE)
, where x
contains your character vector.
Upvotes: 1