recollect: Pastes unique string vectors

View source: R/wrangling_data.R

recollectR Documentation

Pastes unique string vectors

Description

For use with dplyr::summarise, for example

Usage

recollect(x, collapse = "_")

Arguments

x

A vector

collapse

String indicating how elements separated

Details

This function operates similarly to reunite, but instead of operating on columns/observations, it pastes together unique rows/observations.

Value

A single value

Examples


data <- data.frame(ID = c(1,2,3,3,2,1))
data1 <- data.frame(ID = c(1,2,3,3,2,1), One = c(1,NA,3,NA,2,NA))
recollect(data$ID)
recollect(data1$One)


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