Skip to contents

Dates

Manipulate full and partial dates

impute_pdates()
Impute start or end dates
reshape_adates()
Reshape format of all dates (full and partial)
reshape_pdates()
Reshape format of partial dates
trim_dates()
Trim unknown elements in partial dates

Format

Format data

format_chars_and_dates()
Format date and character columns for SDTM tables
trim_and_make_blanks_NA()
Trim white space and make blanks NA

Methods

Create SDTM variables using common methods

assign_SEQ()
Assign SEQ numbers for a SDTM data set
calc_DY()
Calculate a DY variable (day of study)
create_BLFL()
Create a BLFL column
create_EPOCH()
Create the EPOCH variable
create_STAT()
Assign STAT 'NOT DONE' status

Read

Import data

read_edc_tbls()
Import EDC data tables
read_sdtm_tbls()
Import SDTM data tables

Specification data

Retrieve and apply specification data from a .xlsx file

assign_meta_data()
Assign meta data to columns in a SDTM table based on specification file
get_codelist()
Read in the code list from the specification for a specific domain
get_data_spec()
Read in the variable specification sheet for a SDTM data set
get_key_vars()
Read in the key variables for a SDTM domain

Write

Write SAS transport files and archive code

convert_to_script()
Convert SDTM QC code from a .Rmd file to .R script
write_sessionInfo()
Write R session information for a script to a .txt file
write_tbl_to_xpt()
Write a SAS transport file (.xpt)

Example Data

Data used for examples and testing

dm
Example SDTM Domain 'DM'
edc_xx
Example EDC data for form/table 'XX'
spec_codelists
Example 'Codelists' tab from a SDTM specification .xlsx file
spec_datasets
Example 'Datasets' tab from a SDTM specification .xlsx file
spec_XX
Example domain specific tab from a SDTM specification .xlsx file
vd
Example EDC data for form/table 'VD'
xx_no_meta_data
Example SDTM domain table XX without meta data