d <- c('a', 'b', 'c')
n <- c(1, 2, 5)
I would like to produce output:
res <- c('a', 'b', 'b', 'c', 'c', 'c', 'c', 'c')
Is there a function which can use d and n to produce such a result?
d <- c('a', 'b', 'c')
n <- c(1, 2, 5)
I would like to produce output:
res <- c('a', 'b', 'b', 'c', 'c', 'c', 'c', 'c')
Is there a function which can use d and n to produce such a result?