Suppose I have the vector:
x = c("a","b","c")
I would like to create a function that returns the following:
[1] "a*b" "a*c" "b*c"
I assume we would use the paste0() function or use some sort of for loop to loop through the characters in the vector but I am not fully sure how to go about this. Just to clarify, I am looking for an output that takes two characters from the vector at a time and uses some sort of paste0(...,sep="*") to get the desired output above. I do not want to multiply all the characters in the vector at once, just two characters at a time.