0

I have a two different vectors

v1 <- c("HelloWorld", "Climate","fooboo","testtesting")
v2 <- c("hello","test")

I want to compare both the vector and need to get "HelloWorld" and "testingtestin".

I used regexpr, but i have'nt get the result.

sapply(v1 , regexpr, v2 ,  ignore.case=TRUE)
Sotos
  • 51,121
  • 6
  • 32
  • 66
RAAAAM
  • 3,378
  • 19
  • 59
  • 108

0 Answers0