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
  • 47,396
  • 5
  • 31
  • 61
RAAAAM
  • 3,346
  • 18
  • 58
  • 107

0 Answers0