globalVariables(
c(
'.',
'x',
'y'
)
)
`%||%` <- function(x, y) {
if (is.null(x)) y else x
}
is.waive <- function(x) inherits(x, 'waiver')
`%|W|%` <- function(x, y) {
if (is.waive(x)) y else x
}
expand_default <- function(scale, discrete = c(0, 0.6), continuous = c(0.05, 0)) {
scale$expand %|W|% if (scale$is_discrete()) discrete else continuous
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.