clobber: same as dplyr::coalesce

View source: R/package.R

clobberR Documentation

same as dplyr::coalesce

Description

clobber NA, or some value between multiple vectors bads can be a function that returns a logical

Usage

clobber(
  ...,
  bads = NA,
  bads.x = NULL,
  bads.y = NULL,
  r2l = FALSE,
  fromLast = FALSE,
  opposite = TRUE,
  comparefun = NULL,
  remove.empty = TRUE
)

Arguments

...

vectors to merge together

bads

a set of values to clobber, or a function that returns a logical

r2l

merge from left to right per pair of vectors

fromLast

if TRUE, merge from last vector to first

comparefun

A 2 argument function (i.e. function(x,y) x < y), if r2l = FALSE, then the greater value will be chosen as y is on the right, for function(x,y) x < y. if r2l = TRUE, then the lesser value will be chosen


kevinmhadi/khtools documentation built on Jan. 16, 2025, 4:18 p.m.