Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.39 KB

README.md

File metadata and controls

52 lines (34 loc) · 1.39 KB

build status codecov.io cran version cran downloads

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)
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)