Chapter 2 R targets workflows
The R package ‘targets’ is a pipeline toolkit that can orchestrate codes, files, various data sources, and more importantly, document the thinking logic (Landau 2021). This study will utilise three main features of the ‘target’ package (version 0.3.1) including function-orient programming, caching and parallel computing. The function-orient programming provided an apparent pathway for R package development. The caching feature allows users to do quality checking and only update objects that have modified dependencies. Lastly, the parallel computation feature reduced the computing time considerably. Moreover, the script-based workflow contributes to efficient version control and increases reproducibility.
## Warning messages:
## 1: package 'targets' was built under R version 4.0.5
## 2: package 'data.table' was built under R version 4.0.3
## 3: package 'tarchetypes' was built under R version 4.0.5