Nothing
if (at_home()) {
# Plot =======================================================================
## Capture and cleanup plot output
path <- file.path(tempdir(), "Rplot.pdf")
on.exit(unlink(path))
pdf(file = path)
## Save graphical parameters
old_par <- graphics::par(no.readonly = TRUE)
## Plot...
ternary_plot(NULL)
## ...changes the user's graphical parameters...
new_par <- graphics::par(no.readonly = TRUE)
# expect_identical(new_par, old_par) # Fails
dev.off()
## ...but these are the dimensions of the plotting region
## (so it should be OK?)
keys <- new_par[!(new_par %in% old_par)]
expect_identical(names(keys), c('pin', 'plt', 'usr', 'yaxp'))
# Pairs ======================================================================
## Capture and cleanup plot output
path <- file.path(tempdir(), "Rplot.pdf")
on.exit(unlink(path))
pdf(file = path)
## Save graphical parameters
old_par <- graphics::par(no.readonly = TRUE)
## Plot...
ternary_pairs(lava)
## ...does not change the user's graphical parameters
new_par <- graphics::par(no.readonly = TRUE)
expect_identical(new_par, old_par)
dev.off()
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.