align_dfcol
align_dfcol(target, template)
target | data.frame |
---|---|
template | data.frame |
target <- data.frame(matrix(NA, ncol = 5)) template <- data.frame(matrix(NA, ncol = 6)) names(target) <- c(letters[c(3, 1, 2, 4, 8)]) names(template) <- c(letters[1:6]) align_dfcol(target = target, template = template) #> a b c d e f #> 1 NA NA NA NA NA NA