Description Usage Arguments Value See Also Examples
View source: R/take_snapshot.R
Snapshots datasets and the configuration file
1 2 3 4 5 6 | take_snapshot(
datasets = NULL,
destdir = NULL,
overwrite = FALSE,
config = get_config()
)
|
datasets |
Character vector giving the name of a file (without
extension) in which to write the snapshot. It must exactly match the name
of an exported dataset or of a functions which output is a datasets. |
destdir |
Character vector giving the path to the directory to write to.
|
overwrite |
|
config |
Path to a configuration file. |
Returns NULL
. It's called for its side effect.
get_config.
Other handle snapshots:
possible_snapshots()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
library(r2dii.utils)
# Use `config` to provide a local, custom configuration file, locally -- to
# affect this specific call to `take_snapshot()`
datasets <- "DebtMarketClimate"
custom_config <- r2dii.utils::example_config("config-toy.yml")
take_snapshot(
datasets,
destdir = tempdir(), overwrite = TRUE, config = custom_config
)
# Use `options(r2dii_config = <custom_config>)` to provide a custom
# configuration file, globally -- to affect your entire R session
restore <- options(r2dii_config = custom_config)
take_snapshot(
datasets,
destdir = tempdir(), overwrite = TRUE
)
options(restore)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.