Skip to content

goldingn/default

Repository files navigation

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)

About

change the default arguments in R functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages