```
data1 <- data.frame(abb = c("ap","be","pi","straw","sun","straw","pen"), gdp = c(20,30,40,50,60,70,80))
data2 <- data.frame(abb = c("ap","be","pi","straw","sun"),
                    fullname = c("apple","bear","pine","strawberry","sunny")) 

```

I want to replace `data1$abb` with `data2$fullname`.

I try to use the following code to realize it, but I get a warning message:

```
find1 <- paste(data2$abb, collapse = "|")
data1$abb[str_detect(data1$abb, find1)]<- data2$fullname

```

How can I realize it?