powered by
combine multiple vectors into one
combn_vector(..., method = "first", invalid = NA)
combined vector
vectors
how to combine, should be one of first|last, or one of sum|mean|median for numeric vector, or some characters (e.g. ,|.| |;) for character vector
first|last
sum|mean|median
,|.| |;
invalid value to ignore, NA as default
NA
x1 <- c(1, 2, NA, NA) x2 <- c(3, NA, 2, NA) x3 <- c(4, NA, NA, 3) combn_vector(x1, x2, x3, method = "sum")
Run the code above in your browser using DataLab