Skip to contents

[Stable]

Usage

cdisc_dataset_connector(
  dataname,
  pull_callable,
  keys,
  parent = if (identical(dataname, "ADSL")) character(0) else "ADSL",
  label = character(0),
  code = character(0),
  script = character(0),
  vars = list(),
  metadata = NULL
)

Arguments

dataname

(character)
A given name for the dataset it may not contain spaces

pull_callable

(CallableFunction)
function with necessary arguments set to fetch data from connection.

keys

optional, (character)
vector of dataset primary keys column names

parent

(character, optional) parent dataset name

label

(character)
Label to describe the dataset.

code

(character)
A character string defining code to modify raw_data from this dataset. To modify current dataset code should contain at least one assignment to object defined in dataname argument. For example if dataname = ADSL example code should contain ADSL <- <some R code>. Can't be used simultaneously with script

script

(character)
Alternatively to code - location of the file containing modification code. Can't be used simultaneously with script.

vars

(named list))
In case when this object code depends on other TealDataset object(s) or other constant value, this/these object(s) should be included as named element(s) of the list. For example if this object code needs ADSL object we should specify vars = list(ADSL = <adsl object>). It's recommended to include TealDataset or TealDatasetConnector objects to the vars list to preserve reproducibility. Please note that vars are included to this object as local vars and they cannot be modified within another dataset.

metadata

(named list, NULL or CallableFunction)
Field containing either the metadata about the dataset (each element of the list should be atomic and length one) or a CallableFuntion to pull the metadata from a connection. This should return a list or an object which can be converted to a list with as.list.

Value

new CDISCTealDatasetConnector object

Details

Create CDISCTealDatasetConnector from callable_function.