I am new to regex in R. Here I have a vector where I am interested in extracting the first occurance of a number in each string of the vector .
I have a vector calle
stringi would be faster
stringi
library(stringi) stri_extract_first(shootsummary, regex="\\d+") #[1] "34" "42" "23" "27" "64"