I have two arrays in Ruby that I would like to combine together. In R, it is as simple as using the paste function, because it is vectorized:
# R values <- c(1, 2, 3) names <- c("one", "two", "three") paste(values, names, sep = " as ") [1] "1 as one" "2 as two" "3 as three"
In Ruby, this is a bit more complicated, and I would like to know if there is a more direct way:
source share