README.md

udarutils

A collection of utility functions that don't have any other home.

Examples

library(udarutils)
# infix paste operator %+%
greeter <- function(name) "Hello " %+% name
greeter("Tarak"); greeter("Caleb")
## [1] "Hello Tarak"

## [1] "Hello Caleb"
# double pipe (like in Ruby)
sometimes_null <- function(t) if (t == "woops") NULL else t
sometimes_null("normal") %||% "Received bad input"
## [1] "normal"
sometimes_null("woops") %||% "Received bad input"
## [1] "Received bad input"


tarakc02/udarutils documentation built on May 31, 2019, 3:56 a.m.