I have two vectors with some values, but with different lengths:
x <- 1:10
y <- c(3, 5, 8)
I would like to combine these two vectors in a dataframe and get the following result:
data.frame(big = x,
small = c(NA, NA, 3, NA, 5, NA, NA, 8, NA, NA))
source
share