Мы можем использовать outer
outer(A, B, FUN = paste)
# [,1] [,2] [,3] [,4]
#[1,] "Black Dress" "Black Shoe" "Black T-shirt" "Black Long-shirt"
#[2,] "Blue Dress" "Blue Shoe" "Blue T-shirt" "Blue Long-shirt"
#[3,] "Red Dress" "Red Shoe" "Red T-shirt" "Red Long-shirt"
#[4,] "Purple Dress" "Purple Shoe" "Purple T-shirt" "Purple Long-shirt"
#[5,] "Yellow Dress" "Yellow Shoe" "Yellow T-shirt" "Yellow Long-shirt"
Или с map
из purrr
library(purrr)
map(A, ~ str_c(.x, B, sep= " ")) %>%
flatten_chr
#[1] "Black Dress" "Black Shoe" "Black T-shirt" "Black Long-shirt" "Blue Dress" "Blue Shoe"
#[7] "Blue T-shirt" "Blue Long-shirt" "Red Dress" "Red Shoe" "Red T-shirt" "Red Long-shirt"
#[13] "Purple Dress" "Purple Shoe" "Purple T-shirt" "Purple Long-shirt" "Yellow Dress" "Yellow Shoe"
#[19] "Yellow T-shirt" "Yellow Long-shirt"
Данные
A <- c("Black", "Blue", "Red", "Purple", "Yellow")
B <- c("Dress", "Shoe", "T-shirt", "Long-shirt")