b_unite: Unite multiple columns into one.

Description Usage Arguments Details Value Author(s) Examples

View source: R/unite.R

Description

Mimics tidyr::unite using base R and rlang

Usage

1
b_unite(data, col, ..., sep = "_", remove = TRUE)

Arguments

data

data.frame

col

character, name of the new column

...

columns to combine

sep

character, separator to use between values, Default: '_'

remove

boolean, if TRUE remove input columns from output object, Default: TRUE

Details

the main difference between this lite version and the tidyr version is that the new column is attached to the end of the data.frame and not before the index of the first column that is to be united. Since this is mainly aesthetic it was not transfered over.

Value

data.frame

Author(s)

Jonathan Sidi

Examples

1
2
3
4
5
6
7
8
b_unite(airquality, col = "month_day", columns = c(Month,Day))%>%
head

b_unite(airquality, col = "temp_month_day", columns = c(Temp:Day))%>%
head

b_unite(airquality, col = "month_day", columns = c("Month","Day"))%>%
head

yonicd/bplyr documentation built on Feb. 24, 2020, 2 p.m.