Glossary
Every term that the book uses, in one plain sentence each. The chapters explain them in full.
- ADaM: the CDISC standard for analysis data sets, built from SDTM so that each analysis is one step away.
- ADaM specification: the document that gives the name, label, type, length and format of every ADaM variable.
- admiral: the R package of the pharmaverse for ADaM, with one
derive_*()function per common derivation. - ADSL: the subject-level ADaM data set, with one row per subject.
- ADTTE: the ADaM data set for time-to-event analyses, with the time in
AVALand a censor flag inCNSR. - aesthetic: in ggplot2, the link between a column of the data and a property of the plot, such as the x position or the colour.
- AI agent: a program, such as Claude Code or Codex, that uses a language model to run tools and change files for you.
- analysis function: in rtables, a function that gets the values of one column and returns the cells of its lines.
- analysis visit: the visit that an analysis uses, in
AVISITandAVISITN. - anti join: A join that keeps the rows of the first table that have no partner in the second.
- argument: An input of a function.
- assignment arrow:
<-, which stores the value on its right under the name on its left. - at risk: said of a subject who has not had the event and is not yet censored on a given day.
- attribute: extra information that travels with an R object, such as the label of a column.
- base data: in
diffdf(), the data you trust; the first argument. - baseline: the value that later values are compared with; in the pilot SAP, the last non-missing value on or before the first dose.
- batch run: a run of each program in a new R session, as in a production run, with a log file next to each program.
- BDS: the basic data structure of ADaM, with one row per subject, parameter and time point.
- big N: The number of subjects per arm in the population of a table, the denominator of its percents.
- body: The code of a function, between
{and}. - breakpoint: a mark on a line, set in the editor, where the debugger stops the run.
- build log: A text file with one line per step of a study build: what ran, and how many rows came out.
- C sort order: the order of characters by their codes, upper case before lower case, which
arrange()uses on every computer. - call stack: the list of the frames from the top level of the program down to the line where the run stopped.
- case_when(): a dplyr function that tests conditions from top to bottom and gives the value of the first true one.
- censored: a subject without the event, of whom you know only that the event did not happen up to a date.
- change from baseline:
CHG = AVAL - BASE; the percent change isPCHG = CHG / BASE * 100. - character: the R type for text;
glimpse()shows it as<chr>. - check program: a short program that reads the data only and counts the rows that break each assumption of a derivation.
- class: the kind of an R value, such as
"numeric"or"Date", whichclass()shows. - CNSR: the censor flag of ADTTE: 0 when the event happened, 1 when the subject is censored.
- coercion: the change of values to another type; R does it silently when you combine types in one vector.
- column: one named vector of a data frame; in SAS, a variable.
- comment: a line or the end of a line after
#, which R ignores. - compare data: in
diffdf(), the data you check against the base; the second argument. - condition: a warning, a message or an error that R signals while code runs.
- conditional breakpoint: a breakpoint that stops only when an R condition is TRUE at that line.
- coverage: how often each line of a program or a function ran; a line that never ran is a line that no test checked.
- CSV file: a text file with one row per line and values separated by commas.
- customized query: a list of terms that the specification defines, such as CQ01 for dermatologic events.
- data frame: a table in memory, made of named columns of the same length.
- data masking: inside a dplyr verb, the columns of the data come before the variables of the program.
- .data pronoun:
.data[["NAME"]]in a dplyr verb: the column whose name is in a text value. - data rule: a fact that must be true for every row, such as a unique key or a value that is not missing.
- data viewer: the editor tab of DataStep Studio for R that shows a data frame of the session in pages, with filters, counts and sorting.
- Date: the R type for a calendar date, stored as the number of days since 1 January 1970.
- datetime: a date with a time, stored as the number of seconds since 1 January 1970 (
<dttm>). - debugger: a tool that stops a function while it runs, so that you can look at its values and run it line by line.
- decision data: columns that record why a derived value is what it is, such as the source of a baseline.
- default: The value an argument has when the caller does not give one.
- define.xml: the file that describes each data set and variable of a submission for the regulator.
- derived row: an ADaM row that the programmer adds without an SDTM row of its own, marked by
DTYPE. - diffdf: an R package that compares two data frames row by row and lists the differences.
- domain: one SDTM data set, such as DM (demographics), EX (exposure) or AE (adverse events).
- double: the R type for a number with or without decimals;
glimpse()shows it as<dbl>. - double programming: two programmers write the same output independently and compare the results.
- —DTC: an SDTM date as ISO 8601 text, such as
AESTDTC; it can be a partial date.
- embracing: Writing
{{ var }}in a function, so that a dplyr verb uses the column that the caller named. - environment: a place where R keeps names and their values; each function call has its own.
- error: a message from R that stops the program.
- event: in a time-to-event analysis, what you wait for, such as the first dermatologic adverse event.
- event source: in admiral, an
event_source()that says where the events of a time-to-event parameter come from. - expectation: one check inside a test, such as
expect_equal()orexpect_error().
- factor: a column with a fixed list of allowed values, the levels, in an order that you choose.
- figure: an output that shows numbers as a picture, such as a line plot or a Kaplan-Meier plot.
- first cause: the first problem of a run, with its file and line; fix it first, because later problems often follow from it.
- first occurrence flag: a flag on the first treatment-emergent event of a subject (
AOCCFL), of a subject and organ class (AOCCSFL) or of a subject and term (AOCCPFL). - flextable: an R package that makes tables for Word and PowerPoint.
- format: to change only the layout of a program (spaces, indentation, line breaks), not what it does.
- frame: the objects of one function call while it runs; the top level of a program is a frame too.
- full join: A join that keeps every row of both tables.
- function: a named set of steps that takes inputs and gives a result, such as
mean().
- ggplot2: the R package that builds a plot in layers: data and aesthetics, geoms, scales, labels and a theme.
- glue string: a text with
{ }in it that is filled with values, such as"{var}_GT{limit}". - grouped data frame: a data frame after
group_by(), on which every later step works per group untilungroup(). - gt: an R package that makes display tables and writes them as HTML.
- gtsummary: an R package that makes summary tables with one function call, such as
tbl_summary()andtbl_hierarchical().
- hit count: a rule of a breakpoint that stops only on a given number of passes, such as the third.
- imputation: a rule that completes a partial or missing value, such as the first day of the month, with a flag that says so.
- imputation flag: a column that says which part of a date was imputed, such as
ASTDTF(Dfor the day,Mfor the month). - impute: to fill a missing or partial value by a rule, such as the first day of the month.
- inner join: A join that keeps only the keys that are in both tables.
- integer: the R type for a whole number, such as the result of
n();glimpse()shows it as<int>. - ISO 8601: the standard text form of dates and times in SDTM, such as
2014-03-15T09:30.
- join: To put the rows of two tables with the same key side by side.
- Kaplan-Meier curve: a curve that shows, over time, the share of subjects who did not have the event yet.
- Kaplan-Meier estimate: the fraction of subjects still without the event on each day, estimated from times with censoring.
- key: The column, or the columns, that identifies what a row belongs to, such as
USUBJID.
- label: a short description of a column, kept as an attribute in R.
- last observation carried forward (LOCF): a rule that replaces a missing value with the last value before it.
- layout: a data frame with one row per printed line and one column per treatment, every number already formatted as text.
- lazy evaluation: R evaluates an argument only when the body of the function first uses it.
- left join: A join that keeps every row of the first table and adds the matching rows of the second.
- level: one allowed value of a factor.
- levels: The allowed values of a factor, in their order.
- lint: a check that reads a program without running it and finds problems such as typos and missing functions.
- list: An R value that holds other values of any kind, such as data frames.
- list-column: A column whose cells hold whole vectors instead of single values.
- listing: an output that shows records line by line, such as every serious adverse event, not statistics.
- live stop: a stop where the run waits and can go on with
next,step,continueorquit. - log: the record that DataStep Studio for R writes for a run: each message at its program line, and a NOTE for each data frame a step makes.
- log message: a rule of a breakpoint that writes a text with values to the log and does not stop.
- logical: the R type for
TRUE,FALSEandNA;glimpse()shows it as<lgl>. - long data: Data with one row per measurement, such as one row per subject and test.
- lookup: Finding, for each code, the value that belongs to it.
- loop: Code that repeats a block once for each value in a list.
- many-to-many relationship: A join where a key repeats in both tables, so every row is paired with every row of the same key.
- MCP: the Model Context Protocol, the way an AI agent finds and calls the tools of another program.
- MedDRA: the Medical Dictionary for Regulatory Activities, the dictionary that codes adverse events.
- message: a note from R that does not stop the program and does not mean that something is wrong.
- NA: R’s missing value (“not available”), for numbers, text and dates alike.
- named vector: A vector whose values have names, so that you can take a value by its name.
- normal range: the lower and upper limits of a lab value (
ANRLO,ANRHI);ANRINDsays if the value is LOW, NORMAL or HIGH.
- OCCDS: the ADaM structure for occurrence data, with one row per event.
- officer: an R package that creates and reads Word and PowerPoint files.
- open dose row: an EX row without an end date; the subject was still taking the drug when the subject left the study.
- package: a set of functions and data that someone wrote and shared, loaded with
library(). - parameter: what a BDS row measures, named by
PARAMCD(code) andPARAM(text), such asWEIGHT. - parameter file: a small file, such as a CSV, with the settings that drive a run of a program.
- partial date: an ISO 8601 date with only the year and month, or only the year.
- pipe:
|>, which gives the result of one step to the next step; read it as “and then”. - pipe debugger: the tool that runs a pipeline step by step and says, for each step, the rows before and after and why records left.
- pipeline: a chain of steps joined with the pipe, such as
ae |> inner_join() |> filter(). - population flag: a
"Y"or"N"column of ADSL that says whether a subject is in an analysis population, such asSAFFL. - preferred term (PT): the standard MedDRA name of an adverse event, in
AEDECOD. - production program: the program that makes the data set or the table that the study delivers.
- program: a text file of instructions that R reads from top to bottom.
- pronoun:
.data(the columns of the data) or.env(the variables of the program) inside a dplyr verb. - pry: a stop written in a program with
pry(); the run waits there so that you can look at its objects and go on.
- QC finding: a short note for a reviewer: what differs, how many rows, the cause and the open question.
- QC program: a second, independent program that makes the same value from the same specification, to check the production program.
- quosure: a piece of code together with the environment to evaluate it in;
enquo()makes one.
- .rds file: a file that holds one R object in R’s own format, with its types and attributes.
- regular expression: a pattern of text, such as
^\d{4}$for four digits and nothing more. - relationship: The argument of a dplyr join that states how many rows of each table may match, so that R can check it.
- return value: The value that a function gives back: the value of its last line, or of
return(). - right join: A join that keeps every row of the second table and adds the matching rows of the first.
- round half to even: the rule of R’s
round(), which rounds a value exactly halfway to the nearest even number. - round half up: a rounding rule that rounds a value exactly halfway away from zero, as clinical tables do; R
round()rounds it to the even digit. - row: one position across all columns of a data frame; in SDTM, often one record.
- roxygen block: the
#'comments above a function, from which roxygen2 writes the help page and the exports. - rtables: an R package that makes tables from a layout that you describe first and apply to the data with
build_table().
- safety population: the randomised subjects who took at least one dose of the study drug.
- SAP: the statistical analysis plan, which defines populations, derivations and imputation rules.
- scope: the rule for where R looks for a name: first in the function, then where the function was written, then in the packages.
- SDTM: the CDISC standard for the collected data, organised by topic (DM, AE, VS, …).
- semi join: A join that keeps the rows of the first table that have a partner in the second, and adds no columns.
- —SEQ: the sequence number of the rows of a subject in an SDTM domain, such as
AESEQ; withUSUBJIDit is the key of a row. - session: the R process where your programs run; it keeps the objects of every run until it ends.
- set operation: A comparison of two lists of keys: in either list (
union()), in both (intersect()), or in one only (setdiff()). - shell: the mock table from the statistician, with the rows, columns and decimals of a table but no numbers.
- shift table: a count of subjects by their range at baseline and their range after baseline.
- snapshot: a copy of a data frame that DataStep Studio for R keeps outside the session, to compare with after a change.
- snippet: a piece of code that the editor writes when you type its prefix and press Tab.
- specification: the document of the lead programmer with one row per variable: name, label, type and derivation.
- stack: To put the rows of one table under the rows of another, with
bind_rows(). - standard error (SE): the standard deviation divided by the square root of n; it shows how precise a mean is.
- step over, step into, step out: run the next line of this function; go into the function that the line calls; go back to the caller.
- study day: the day relative to the first dose, which is day 1; the day before is day -1, and there is no day 0.
- style guide: the rules for how code looks; most R teams use the tidyverse style guide.
- SUPPDM: The SDTM data set of supplemental qualifiers for DM: one row per subject and qualifier, with
QNAMandQVAL. - suspicious log: the list of the messages of a run that a QC programmer looks for, each with its rule, why it matters and a fix.
- system organ class (SOC): The top level of the MedDRA dictionary, such as “Gastrointestinal disorders”.
- TEAE: A treatment-emergent adverse event: an event that started or got worse after the first dose.
- test: code that runs a function with known input and checks the result; in testthat, one
test_that()call. - tibble: the tidyverse form of a data frame, which prints the type of each column and the first rows.
- tidy evaluation: The way dplyr looks for names inside the data frame first.
- TLF: tables, listings and figures, the outputs of a study.
- token: one word of a program, such as a name, an operator, a number or a string.
- tolerance: the largest difference between two numbers that a compare still counts as equal.
- Total column: a table column for all subjects together, made by stacking the data on itself with the treatment “Total”.
- trace: a run of one function call that lists every line that ran, the values it changed and each
ifwith its result. - traceability: the property that every number can be traced to the data it came from.
- treatment emergent: an adverse event that starts on or after the first dose; flagged by
TRTEMFL = "Y". - treatment-emergent: an adverse event that started or got worse after the first dose.
- type: the kind of values that a vector holds: text, number, logical or date.
- value: one piece of data, such as the number 63 or the text “01-701-1015”.
- value picker: the list of the values of a column with their counts, where you tick values and the viewer writes the R condition.
- variable: in R, a name that holds a value, made with
<-. - vector: values of the same type in order, made with
c(). - vectorised: Said of a function that works on a whole vector or column in one call.
- verdict: the last line of a run or a check, such as
RESULT: CLEAN,CHECKorERROR, that says whether the result needs your attention.
- warning: a message from R that does not stop the program but says that a result may be wrong.
- watch: a stop at the line after a value changes (in the editor: Break on Value Change).
- wide data: Data with one row per subject and one column per measurement.
- xportr: an R package that applies a specification (type, length, label, format, order) to a data frame and writes an XPT file.
- XPT: the SAS transport file, version 5, the format in which data sets go to the regulator.
Found an error or have a question? Write to datastep.studio@gmail.com· Every program runs in DataStep Studio for R, the R extension for VS Code and Positron.
Data: the CDISC pilot study (cdiscpilot01), from the R packagespharmaversesdtm andpharmaverseadam (Apache License 2.0).
R is a project of the R Foundation. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. This book is not affiliated with or endorsed by SAS Institute Inc. or the R Foundation. CDISC, SDTM and ADaM are trademarks of the Clinical Data Interchange Standards Consortium.
© 2026 DataStep Labs. All rights reserved.