checkSection: Check for existence of a section in the Project config

Description Usage Arguments Details Value Methods (by class) Examples

Description

This function checks for the section/nested sections in the config YAML file. Returns TRUE if it exist(s) or FALSE otherwise.

Usage

1
2
3
4
checkSection(object, sectionNames)

## S4 method for signature 'Config'
checkSection(object, sectionNames)

Arguments

object

object of "Config"

sectionNames

the name of the section or names of the nested sections to look for

Details

Element indices can be used instead of the actual names, see Examples.

Value

a logical indicating whether the section exists

Methods (by class)

Examples

1
2
3
4
5
projectConfig = system.file("extdata", "example_peps-master",
"example_amendments1", "project_config.yaml", package="pepr")
p=Project(projectConfig)
checkSection(config(p),sectionNames = c("amendments","newLib"))
checkSection(config(p),sectionNames = c("amendments",1))

pepr documentation built on Jan. 13, 2021, 3:50 p.m.