A collection of utility functions that don't have any other home.
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"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.