combine_multi_elements: Combine multiple elements

Description Usage Arguments Value Author(s)

View source: R/string_utils.R

Description

Combine multiple elements taking the class into account

Usage

1
2
3
4
5
6
7
combine_multi_elements(
  x,
  sep = ",",
  numeric_FUN = mean,
  logical_FUN = all,
  na.rm = T
)

Arguments

x

a vector of a class

sep

separating character. refer to concatenate_skip_overlap

numeric_FUN

the function to handle numeric elements. The default is mean

logical_FUN

the function to aggregate logical elements. The default is all

na.rm

if NA is removed

Value

a vector of same class as x

Author(s)

Mun-Gwan Hong, mungwan@gmail.com


Rundmus/Useful2me-R_package documentation built on Nov. 13, 2020, 4:16 p.m.