I have a character vector in R, and want to make a new vector with multiple NAs between the elements of the character vector. To simplify, the character vector is:
cv <- c( "A", "B", "C" )
Let's say we just want 3 NAs (actually need much more). Desired output vector would be:
"A", NA, NA, NA, "B", NA, NA, NA, "C", NA, NA, NA
I'm guessing this has been asked before, but it's very difficult to search for. I've tried various permutations and combinations of rep and rbind with no success. Be gentle; my first question :-)