str_dt_col_combine: Combine columns of a data.table into a list in a new column,...

Description Usage Arguments Value Examples

View source: R/text.table.R

Description

Combine columns of a data.table into a list in a new column, wraps list(unlist(c(...)))

Usage

1

Arguments

...

Unquoted column names of a data.table.

Value

A list, with columns combined into a vector if grouped properly

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
as.data.table(
list(
  col1 = c(
    "a",
    "b"
  ),
  col2 = c(
    tolower("The dog is nice because it picked up the newspaper."),
    tolower("The dog is extremely nice because it does the dishes.")
  ),
  col3 = c(
    "test 1",
    "test 2"
  )
)
)[, col4 := .(str_dt_col_combine(col2, col3)), col1]

textTools documentation built on Feb. 5, 2021, 5:07 p.m.