Here is a workflow to create a Shift Table in R, using the {tidyverse} suite for data processing, and {gt} to build the desired table layout.
Required Packages
Code
suppressPackageStartupMessages(library(dplyr))suppressPackageStartupMessages(library(tidyr))suppressPackageStartupMessages(library(rlang))suppressPackageStartupMessages(library(purrr))suppressPackageStartupMessages(library(stringr))suppressPackageStartupMessages(library(gt))suppressPackageStartupMessages(library(here))# list all filesfiles <-list.files(here("R"), pattern =".R", full.names =TRUE)# Read all fileswalk(files, source)
Data used for Analysis
We will make use of the adsl and adlb test ADaM datasets from the {pharmaverseadam} R package for analysis.