Skip to contents

Write automated report metadata

Usage

writeAutoReportData(
  fileName = "autoReport.yml",
  config,
  packageName = "rapbase"
)

Arguments

fileName

String defining name of the yaml configuration file. Default 'autoReport.yml'

config

a list of yaml configuration

packageName

String defining the package in which the above configuration file resides. A configuration file within an R-package is only used in case the environmental variable 'R_RAP_CONFIG_PATH' is not defined (empty)

Examples

# \donttest{
# Example depend on environment variable R_RAP_CONFIG_PATH being set
config <- readAutoReportData()
#> Auto report data were upgraded: auto reports with no type defined now set to 'subscription'.
#> Auto report data were upgraded: auto reports with no owner name defined now set to an empty string.
#> Auto report data were upgraded: function params list un-nested. Please check that autor reports for registries are still working as expected.
try(writeAutoReportData(config = config))
#> Error in writeAutoReportData(config = config) : 
#>   There is nowhere to store config data. The environment variable R_RAP_CONFIG_PATH must be defined providing av path to a directory where configuration can be written. Stopping
# }