I'm looking at a number of cells in a data frame and am trying to extract any one of several sequences of characters; there's only?one of these sequences per per cell.
Here's what I mean:
dF$newColumn = str_extract_all(string = "dF$column1", pattern ="sequence_1|sequence_2")
Am I screwing the syntax up here? Can I pull this sort of thing with stringr? Please rectify my ignorance!
See Question&Answers more detail:os