Learn R Programming

connector (version 1.0.0)

list_datasources: Extract data sources from connectors

Description

This function extracts the "datasources" attribute from a connectors object.

Usage

list_datasources(connectors)

Value

An object containing the data sources extracted from the "datasources" attribute.

Arguments

connectors

An object containing connectors with a "datasources" attribute.

Details

The function uses the attr() function to access the "datasources" attribute of the connectors object. It directly returns this attribute without any modification.

Examples

Run this code

# Connectors object with data sources
cnts <- connectors(
  sdtm = connector_fs(path = tempdir()),
  adam = connector_dbi(drv = RSQLite::SQLite())
)

# Using the function (returns datasources attribute)
result <- list_datasources(cnts)
# Check if result contains datasource information
result$datasources

Run the code above in your browser using DataLab