I have 2 single column datasets but dataset A has fewer rows than dataset B.
I am trying to create a second data frame with 2 columns combining the 2 datasets. Something like this:
A <- data.frame(A=c('x','y','z'))
B <- data.frame(B=c('a','b','c','d','e'))
I need to combine both to create the dataframe bellow,(repeating all elements of A until the next...):
C <- data.frame(C=c('x','x','x','x','x','y','y','y','y','y','z','z','z','z','z'),D=c('a','b','c','d','e'))
The original datasets are much larger than this so I am trying to figure out an easy way to do it.