config <- system.file("config", "default_config.yml", package = "connector")
config
# Show the raw configuration file
readLines(config) |>
cat(sep = "\n")
# Connect to the datasources specified in it
cnts <- connect(config)
cnts
# Content of each connector
cnts$adam
cnts$sdtm
# Overwrite metadata informations
connect(config, metadata = list(extra_class = "my_class"))
# Connect only to the adam datasource
connect(config, datasource = "adam")
# Connect to several projects in a nested structure
config_nested <- system.file("config", "_connector_nested.yml", package = "connector")
readLines(config_nested) |>
cat(sep = "\n")
cnts_nested <- connect(config_nested)
cnts_nested
cnts_nested$study1
Run the code above in your browser using DataLab