In the pharmaceutical industry, a great deal of the data presented in the outputs we create are very similar. For the most part, most of these tables can be broken down into a few categories Counting for event based variables or categories, shifting to describe changes in state, and descriptive statistics to summarize continuous variables. For many of the tables that go into a clinical submission, at least when considering safety outputs, the tables are made up of a combination of these approaches. Consider a demographics table. When you look at the table, you can begin breaking the output down into smaller, redundant, components. These components can be viewed as ‘layers’, and the table as a whole is constructed by stacking those layers. Tplyr uses this concept to provide an intuitive framework to building clinical safety summaries.