Baseplus aims to enhance functionality by developing novel features derived from the foundation of baseR functions.

Installation

To install the latest development version from GitHub

# install.packages("remotes")
remotes::install_github("poissonconsulting/baseplus")

Examples

The infix operator %nin% returns a logical vector determining if x is NOT present.

library(baseplus)
output <- "x" %nin% c("a", "b", "c")
print(output)
#> [1] TRUE

The infix operator %||% replaces NULL or length of 0 values with a specified replacement value.

library(baseplus)
x <- NULL
x <- x %||% "replacementValue"
print(x)
#> [1] "replacementValue"

Inspiration

  • base

Contribution

Please report any issues. Pull requests are always welcome.

Code of Conduct

Please note that the baseplus project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.