A vectorised function for use with dplyr's mutate, etc
Arguments
- ...
Variables to pass to the function, currently only two at a time
- sep
Separator when vectors reunited, by default "_"
Examples
# \donttest{
data <- data.frame(fir=c(NA, "two", "three", NA),
sec=c("one", NA, "three", NA), stringsAsFactors = FALSE)
transmutate(data, single = reunite(fir, sec))
#> single
#> 1 one
#> 2 two
#> 3 three
#> 4 <NA>
# }