I have the following vector of character strings:
v<-c("RT @name1: hello world", "Hi guys, how are you?", "Hello RT I have no text", "RT @name2: Hello!")
I would like to delete only those RT
that are positioned at the beginning of strings and store the results in another vector, e.g., w
:
> w
"@name1: hello world" "Hi guys, how are you?" "Hello RT I have no text" "@name2: Hello!"
Maybe I could use function str_extract_all
from the package stringr
, but I can't apply it to my problem.