To unite two columns in R using the mutate
function from the dplyr package along with the unite
function from the tidyr package, you can use the following code:
main.r342 chars18 lines
However, unite
is actually a function from the tidyr package. If you want to use mutate
to unite two columns, you can use the paste
function or str_c
from the stringr package:
main.r366 chars18 lines
Or using paste
:
main.r252 chars13 lines
gistlibby LogSnag