Skip to content

ices-taf-dev/targets-rjm-347d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comparison between TAF and targets

The TAF and targets packages have somewhat similar objectives, to organize and run scientific workflows or pipelines.

A key distinction between the packages is that in TAF the user organizes their workflow by writing scripts that produce files, but in targets the user organizes their workflow by writing functions that produce objects, to be passed to the next step. Thus, the two packages present two different paradigms with a similar end result.

A TAF workflow structure is predetermined, as the main scripts will always be named data.R, model.R, output.R, and report.R. After running a TAF analysis, one can always expect to find the data and results in CSV format in the corresponding data, output, and report folders.

In contrast, the targets package does not confine the user to a predetermined workflow design, and tables containing data and results are generally accessed by the user as R objects rather than files.

The purpose of the taf-four-minutes and targets-rjm-347d repositories is to facilitate comparing the functionality of the two packages.

targets-rjm-347d

This targets-rjm-347d analysis is a simple pipeline organized and run using the targets package. It is similar to the ICES TAF 2015_rjm-347d demonstration of how workflows are organized and run using the TAF (or equivalently icesTAF) package.

How to run

Install the targets package from CRAN. Then open R in the targets-rjm-347d directory and run:

library(targets)
tar_make()

Browsing or reviewing the analysis

After running the pipeline, the objects can be loaded into the current workspace:

tar_objects()
tar_load_everything()
Object Content
catch catch data
read.csv(survey_file) original survey data (1977-2015)
survey survey data used in the analysis (1993-2014)
summary catch and combined survey index (1993-2014)
summary_rnd summary table rounded to 3 digits
dls catch advice (291 tonnes) and intermediate calculations
plot plot showing the combined survey index

See also

Another comparison between TAF and targets is provided by the taf-four-minutes example.

For an overview of the TAF package, see the TAF vignette.

For an overview of the targets package, see the targets vignette.

About

Comparison between TAF and targets

Resources

Stars

Watchers

Forks

Languages