Config" object elements — select-config" />

You can subset Config by identifier or by position using the `[`, `[[` or `$` operator. The string will be expanded if it's a path.

# S4 method for Config
[(x, i)

# S4 method for Config
[[(x, i)

# S4 method for Config
$(x, name)

Arguments

x

a "Config" object.

i

position of the identifier or the name of the identifier itself.

name

name of the element to access.

Value

An element held in "Config" object

Examples

projectConfig = system.file("extdata", "example_peps-master", "example_amendments1", "project_config.yaml", package="pepr") c=Config(projectConfig)
#> Loading config file: /private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpEYsaEm/temp_libpath43b174cbd72/pepr/extdata/example_peps-master/example_amendments1/project_config.yaml
#> amendments: newLib,newLib2
c[[2]]
#> [1] "/private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpEYsaEm/temp_libpath43b174cbd72/pepr/extdata/example_peps-master/example_amendments1/sample_table.csv"
c[2]
#> [[1]] #> [1] "/private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpEYsaEm/temp_libpath43b174cbd72/pepr/extdata/example_peps-master/example_amendments1/sample_table.csv" #>
c[["sample_table"]]
#> [1] "/private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpEYsaEm/temp_libpath43b174cbd72/pepr/extdata/example_peps-master/example_amendments1/sample_table.csv"
c$sample_table
#> [1] "/private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpEYsaEm/temp_libpath43b174cbd72/pepr/extdata/example_peps-master/example_amendments1/sample_table.csv"