This works for these values:
library(tidyverse)
df <- tibble::tribble(
~location,
"s. sj",
"S. SJ @ Ashley Store",
"S. SJ @ Ashley",
"Pleasanton",
"pleas",
"Pleasanton @ Ranch 99"
)
df %>%
mutate(location2 = case_when(
location %in% c("s. sj", "S. SJ @ Ashley Store", "S. SJ @ Ashley") ~ "S. SJ @ Ashley Store",
location %in% c("Pleasanton", "pleas", "Pleasanton @ Ranch 99") ~ "Pleasanton @ Ranch 99",
TRUE ~ NA_character_
))