utility_funs: Utility functions

utility_funsR Documentation

Utility functions

Description

Set of simple utility functions for common use.

Usage

any0(...)

all0(...)

x %||% y

is_wholenum(a)

brackets(a, type = c("smooth", "square", "squiggly"))

Arguments

...

logical expression passed to any() or all()

x

vector/list to check for NULL

y

value to replace NULLs

a

numeric vector

type

string. type of bracket to use. Defaults to "smooth".

Functions

  • any0(): wrapper for any() with na.rm = TRUE

  • all0(): wrapper for all() with na.rm = TRUE

  • x %||% y: replace NULL with default value

  • is_wholenum(): check if values are whole numbers

  • brackets(): enclose string in brackets.


WhiteJP/jpw documentation built on April 17, 2025, 5:47 a.m.