Persistent Package Configuration
Store the configuration of your package in the user's platform dependent config file directory. The configuration persists across R sessions, and can also be edited manually. Configuration files are YAML files.
Once on CRAN, install the package with:
conf uses the
rappdirs package (https://github.com/hadley/rappdirs) to
determine the appropriate location of the configuration file of a package.
To determine the location of the configuration file, you can use:
conf$new(package = "mypackage")$get_path()
#>  "/Users/gaborcsardi/Library/Application Support/r-config/mypackage/config.yaml"
Create a configuration file by creating a
conf object, then setting
some configuration keys in it, and writing it out to a file:
cf <- conf$new(package = "mypackage", lock = TRUE)
cf$set("user:id", "test-user") cf$set("user:email", "firstname.lastname@example.org") cf$set("rversion", format(getRversion()))
#> user: #> id: test-user #> email: email@example.com #> rversion: 3.5.3
MIT © RStudio Inc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.