reunite: Pastes unique string vectors

View source: R/wrangling_data.R

reuniteR Documentation

Pastes unique string vectors

Description

A vectorised function for use with dplyr's mutate, etc

Usage

reunite(..., sep = "_")

Arguments

...

Variables to pass to the function, currently only two at a time

sep

Separator when vectors reunited, by default "_"

Value

A single vector with unique non-missing information

Examples


data <- data.frame(fir=c(NA, "two", "three", NA),
                   sec=c("one", NA, "three", NA), stringsAsFactors = FALSE)
transmutate(data, single = reunite(fir, sec))


globalgov/manydata documentation built on May 10, 2024, 9:48 p.m.