I can use stringr to find the start "http" location at first row,
library(stringr)
a <- str_locate(message[1,], "http")[1]
a
[1] 38
I want to find the start location for each row, and use "apply" fuction:
message$location <- apply(message, 1, function(x) str_locate(message[x,], "http")[1])
But it shows all "NA" values, could I fix it?