The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

S7schema S7schema website

R-CMD-check

S7schema provides a generic way of working with yaml config files. The main functionality is captured in the S7schema() class that:

  1. Uses S7 for easy downstream use in other packages (e.g. new child classes and methods).
  2. Uses ‘ajv’ for validation of the config file given JSON schema.
  3. Inherits from list ensuring a seamless integration into existing code using the configuration entries.

Installation

# Install the latest released version from CRAN:
install.packages("S7schema")

# Install the development version from GitHub:
pak::pak("NovoNordisk-OpenSource/S7schema")

Usage

library(S7schema)

A new instance of an S7schema class can be initiated with:

config <- S7schema("path/to/my/config.yml", "path/to/my/schema.json")

Since config is a list it can be updated (here adding an “a” element):

config$a <- 2

And it can be validated again:

validate(config)

Which will now throw an error if a = 2 is an illegal entry according to the schema in "path/to/my/schema.json".

Learn more

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.