I have two data vectors (datA and datB) that needs combining into a single dataframe. It looks like a straight-forward thing to accomplish, until I tried unsuccessfully as shown below:
datA <- c("uuw", "aat", "auyt", "uut")
datB <- c("mmu", "asty", "wou")
XX <- data.frame(m=rep(NA, datA),y=rep(NA, datB))
My attempt generated the following errors:
Error in rep(NA, datA) : invalid 'times' argument
In addition: Warning message:
In data.frame(m = rep(NA, datA), y = rep(NA, datB)) :
NAs introduced by coercion
Please help!