I have two data frames in R with different underlying data.
The first data frame has character data, while the second has numeric data. Each data frame is a different length.
Is there a way to combine these data frames of different lengths AND different data types into one data frame.
The goal is to create a 6x2 data frame with the data repeated.
Example:
a = c("1M", "2M") # 2x1 vector
b = c(0.75, 0.80, 0.85) # 3x1 vector
a = as_tibble(a)
b = as_tibble(b)
c1 = c("1M", "1M", "1M", "2M", "2M", "2M")
c2 = c(0.75, 0.80, 0.85, 0.75, 0.80, 0.85)
result_mat = cbind(c1, c2)
result_mat = as_tibble(result_mat) # 6x2 data frame