build status codecov.io cran version cran downloads

knitr::opts_chunk$set(echo = TRUE, cache = FALSE, fig.height=3, fig.width=4)
set.seed(1)

default

change the default arguments in R functions.

Tired of always typing out the same old arguments to functions? Use default() to set your favourite arguments as the defaults.

Example:

install.packages("default")
library(default)
library (default)
boring old defaults
hist(iris$Sepal.Width)
exciting new defaults
default(hist.default) <- list(col = "deeppink", border = "white", ylab = "", main = "")
hist(iris$Sepal.Width)
you can still change the arguments
hist(iris$Sepal.Width, col = "limegreen")
and restore the original defaults
hist.default <- reset_default(hist.default)
hist(iris$Sepal.Width)


goldingn/default documentation built on May 30, 2019, 7:20 p.m.