Skip to contents

[Stable]

[Stable]

Usage

rds_dataset_connector(
  dataname,
  file,
  keys = character(0),
  label = character(0),
  code = character(0),
  script = character(0),
  metadata = list(type = "rds", file = file),
  ...
)

rds_cdisc_dataset_connector(
  dataname,
  file,
  keys = get_cdisc_keys(dataname),
  parent = if (identical(dataname, "ADSL")) character(0L) else "ADSL",
  label = character(0),
  code = character(0),
  script = character(0),
  metadata = list(type = "rds", file = file),
  ...
)

Arguments

dataname

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

file

(character)
path to (.rds or .R) that contains data.frame object or code to source

keys

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

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.

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.

...

(optional)
additional arguments applied to base::readRDS() function

parent

(character, optional) parent dataset name

Details

Create a TealDatasetConnector from RDS file.

Create a CDSICTealDatasetConnector from RDS file with keys automatically assigned by dataname

Examples

if (FALSE) {
x <- rds_dataset_connector(
  dataname = "ADSL",
  file = "path/to/file.RDS"
)
x$get_code()
}