Skip to contents

1 Overview

On a very general level, in the context of {improveR}, a workflow is a distinct sequence of steps, grouped by analysis-trees, which transforms a distinct input into a distinct output. The precise definition of a workflow is the foundation of the analysis’ reproducibility and general replicability. {improveR} workflow capabilities simplify the creation of such formulations and facilitate the chaining of individual steps into a robust framework encompassing the entire analytical process from the data ingestion, EDA, modeling, and reporting to the result’s audit.

Furthermore, {improveR} provides the ability to take an already created workflow and to transfer it to another research context, while keeping inter-step relations, file input and output specifications as well as tools and their definitions in order. By this, researchers can easily apply an available analytical workflow in a different context and investigate, e.g. how outcomes differ due to different inputs while keeping the chain of steps unaltered. Rather than re-creating each individual step from scratch, portability ensures an efficient application of the workflow in a new context.

This article provides an overview of {improveR}‘s most relevant functions for working with workflows. The examples are based on the demo repository ’improve-tutorial’ containing mock data.

Figure 1: Improve client - DMG across all steps, grouped by analysis trees

The graph above depicts improve’s Data Manipulation Graph (DMG) for the entire folder. Step Reporting/Step 1 (ST-62516) in the Analysis Tree ‘Reporting’ is its final step in the overall workflow.

2 Retrieving an existing workflow

If one is interested in obtaining the workflow leading to a specific step, the function getStep() is key. The function takes the ident1 of the step of interest as an argument and returns an environment containing all the elements describing the step. From this environment, the workflow leading to the step can be extracted via the lineage binding. The lineage of a step are all upstream steps creating output which is directly or indirectly used by the step of interest.

The parameters treeDepth and stepDepth limit the upstream reach of the call, i.e. they define a cut-off point for the retrieved lineage of the step in question. Once loaded, the workflow can be accessed via the workflow binding.

Figure 2: Improve client - Lack of arrows to the right indicates absence of usage

2.1 treeDepth

In the example below, let’s request the full workflow leading to step /improve-tutorial/Reporting/Step 1. With an treeDepth input value of -1, the entire workflow is extracted. Note that the returned data frame also includes step 1 of the reporting analysis tree, i.e. the actual step for which the workflow is retrieved. The binding df() returns a data frame containing all steps constituting the workflow.

Get complete workflow leading to Step 1 of AT Reporting
# get step environment
envATReportingStep1 <- getStep("/improve-tutorial/Reporting/Step 1")

# load the steps lineage with desired depth
envATReportingStep1$lineage$load(treeDepth=-1)
## 2025-10-14 11:56:01.29539 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to lineage
## 2025-10-14 11:56:03.108203 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to lineage
## 2025-10-14 11:56:05.103654 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to lineage
## 2025-10-14 11:56:07.616018 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to lineage
## 2025-10-14 11:56:09.503264 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to lineage
## 2025-10-14 11:56:12.095056 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to lineage
## 2025-10-14 11:56:14.449979 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to lineage
## 2025-10-14 11:56:17.157264 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to lineage
## 2025-10-14 11:56:19.336225 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to lineage
## 2025-10-14 11:56:21.639787 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to lineage
## 2025-10-14 11:56:25.636916 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to lineage
## 2025-10-14 11:56:28.906109 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to lineage
## 2025-10-14 11:56:35.029486 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to lineage
## 2025-10-14 11:56:38.646139 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to lineage

# show steps constituting the workflow with df()
envATReportingStep1$workflow$df() %>% select(fullName)
##                  fullName
## 1  DataOrder/Step 2/54625
## 2  DataOrder/Step 3/54627
## 3  DataOrder/Step 4/54744
## 4  DataOrder/Step 6/75706
## 5       EDA/Step 15/57280
## 6       EDA/Step 17/59046
## 7        EDA/Step 5/54047
## 8        EDA/Step 6/54049
## 9   Modeling/Step 1/54635
## 10 Modeling/Step 10/59463
## 11  Modeling/Step 6/54651
## 12  Modeling/Step 7/54672
## 13  Modeling/Step 8/54675
## 14  Modeling/Step 9/54678
## 15 Reporting/Step 1/62516

Figure 3 shows the data manipulation graph of the improve client for the workflow leading to Reporting/Step1. It is the visual representation of the relations between the steps which were extracted via getStep() and subsequent function calls.

Figure 3: Improve client DMG - Complete workflow leading to Step 1 of AT Reporting

When contrasting this result with the ‘full’ folder as depicted in Figure 5, it can be noticed that step EDA/Step 18 is missing. This is because the step does not form part of the workflow leading to our ‘destination’ step Reporting/Step 1.

To demonstrate this aspect, let’s obtain the usage of EDA/Step 18. With a step’s usage all those steps are captured which depend further downstream in the analytical workflow on at least one file generated by the step of origin, i.e. EDA/Step 18. Again, getStep() is the required method.

Get usage of step outside of workflow
# get step environment
envATEDAStep18 <- getStep(ident="/improve-tutorial/EDA/Step 18")

# load usage with desired depth
envATEDAStep18$usage$load(treeDepth=-1)

# reveal content of usage
ls(envATEDAStep18$usage)
## [1] "load"

The result above reveals that step EDA/Step 18 has no usage, i.e. there are no other steps which would depend on any file produced by it. The load() function remains the sole element even after calling it. This result is in line with the earlier finding, that EDA/Step 18 is no element of the workflow or lineage leading to Reporting/Step 1. Would EDA/Step 18 be within the lineage of Reporting/Step 1, the latter would also have to be within the usage of the former.

2.2 stepDepth

Similar to the argument treeDepth, stepDepth also allows setting the reach of the workflow of interest. However, rather than delimiting its reach by analysis trees, it sets the workflow’s boundaries by steps. The example below extracts the workflow leading to Reporting/Step 1 with stepDepth of 1.

Get only workflow starting at adjacent AT leading to Step 1 of AT Modeling
# get step environment 
envATReportingStep1 <- getStep("/improve-tutorial/Reporting/Step 1")

# load lineage with desired depth
envATReportingStep1$lineage$load(stepDepth=1)
## 2025-10-14 11:57:56.883578 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to lineage
## 2025-10-14 11:57:57.706392 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to lineage
## 2025-10-14 11:57:58.795113 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to lineage
## 2025-10-14 11:57:59.870173 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to lineage
## 2025-10-14 11:58:01.082382 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to lineage
## 2025-10-14 11:58:02.453295 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to lineage
## 2025-10-14 11:58:03.853997 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to lineage
## 2025-10-14 11:58:05.287252 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to lineage
## 2025-10-14 11:58:06.783164 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to lineage
## 2025-10-14 11:58:08.265231 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to lineage

# extract workflow
envATReportingStep1$workflow$df() %>% 
select(treeName, fullName)
##     treeName               fullName
## 1  DataOrder DataOrder/Step 3/54627
## 2        EDA      EDA/Step 15/57280
## 3        EDA      EDA/Step 17/59046
## 4        EDA       EDA/Step 6/54049
## 5   Modeling  Modeling/Step 1/54635
## 6   Modeling Modeling/Step 10/59463
## 7   Modeling  Modeling/Step 6/54651
## 8   Modeling  Modeling/Step 7/54672
## 9   Modeling  Modeling/Step 8/54675
## 10  Modeling  Modeling/Step 9/54678
## 11 Reporting Reporting/Step 1/62516
Figure 4: Improve client - DMG workflow with stepDepth 1

2.3 Identifying files linked across steps

Note that the result presented in the chunk above includes also steps from the ‘first’ Analysis Tree, ‘Data Order’. This is due to a direct link between Step 3 in ‘Data Order’ and Step 1 in ‘Reporting’. If we want to check which files link the two steps, we can easily find this out via workflow’s internalLinks. internalLinks are links within a workflow which establish the connection between one step’s output and another step’s input.

Check for files connecting Step 3 of AT Data Order with Step 1 of AT Reporting
filesATDOS3ATReprotingS1 <- envATReportingStep1$workflow$internalLinks %>% 
  dplyr::filter(str_detect(sourceStep, regex("DataOrder"))) %>%
  dplyr::filter(str_detect(targetStep, regex("Reporting"))) %>%
  select(name, sourceInventoryPath, sourceStep, targetStep)

filesATDOS3ATReprotingS1
##                                 name              sourceInventoryPath             sourceStep             targetStep
## 1                  ./missingData.png                  missingData.png DataOrder/Step 3/54627 Reporting/Step 1/62516
## 2 ./missingDataLocationFrequency.png missingDataLocationFrequency.png DataOrder/Step 3/54627 Reporting/Step 1/62516

In Reporting/Step 1 these files show up in the remoteFiles binding with asLink set to TRUE.

Get remote files of Reporting/Step 1 and check for files
envATReportingStep1$stepDf$remoteFiles[[1]] %>%
  as_tibble() %>%
  select(name, ident, asLink) %>%
  filter(name %in% filesATDOS3ATReprotingS1$name)  
## # A tibble: 2 × 3
##   name                               ident                                           asLink
##   <chr>                              <chr>                                           <lgl> 
## 1 ./missingData.png                  envhost1.hc.scintecodev.internal-5310:FI-111403 TRUE  
## 2 ./missingDataLocationFrequency.png envhost1.hc.scintecodev.internal-5310:FI-111400 TRUE

Conversely, the files are also part of the inventory of Step 3 in the AT Data Order.

Check inventory of DataOrder/Step 3
envATDOStep3 <- getStep(ident="/improve-tutorial/DataOrder/Step 3/")

inventoryATDOStep3 <- envATDOStep3$getStepInventory()$data[[1]] %>%
  select(name, entityId) %>%
  filter(name %in% filesATDOS3ATReprotingS1$sourceInventoryPath)

inventoryATDOStep3
##                               name                                        entityId
## 1                  missingData.png envhost1.hc.scintecodev.internal-5310:FI-111403
## 2 missingDataLocationFrequency.png envhost1.hc.scintecodev.internal-5310:FI-111400

3 Removing a step from a workflow

There can be situations where an analyst comes to the conclusion that a step within a workflow is no longer needed and has to be removed. With the removeStep() function which forms part of the step’s workflow binding, {improveR} offers a convenient way to do so. This is particularly useful if a step should be excluded from an exported workflow, e.g. because it contains sensitive information or because it is not relevant in the context of the new repository.

In the example below, step Modeling/Step 10 will be removed.

Remove Step /improve-tutorial/Modeling/Step 10
# get workflow of `Reporting/Step 1`
envATReportingStep1 <- getStep("/improve-tutorial/Reporting/Step 1")

# get the workflow and show details on Step 'Modeling/Step 10'
envATReportingStep1$lineage$load(treeDepth=-1)
## 2025-10-14 11:58:14.792825 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to lineage
## 2025-10-14 11:58:15.635833 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to lineage
## 2025-10-14 11:58:16.588822 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to lineage
## 2025-10-14 11:58:17.668978 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to lineage
## 2025-10-14 11:58:18.795877 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to lineage
## 2025-10-14 11:58:20.128355 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to lineage
## 2025-10-14 11:58:21.617066 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to lineage
## 2025-10-14 11:58:23.153049 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to lineage
## 2025-10-14 11:58:24.755494 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to lineage
## 2025-10-14 11:58:26.1753 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to lineage
## 2025-10-14 11:58:28.443003 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to lineage
## 2025-10-14 11:58:30.530743 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to lineage
## 2025-10-14 11:58:34.334858 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to lineage
## 2025-10-14 11:58:36.867688 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to lineage

# show step 10 in the workflow
envATReportingStep1$workflow$df() %>%
  filter(str_detect(fullName, regex("Step 10"))) %>%
  select(fullName, sourceEntityId, rationale, description)
##                 fullName                                 sourceEntityId     rationale                               description
## 1 Modeling/Step 10/59463 envhost1.hc.scintecodev.internal-5310:ST-59463 Model results Create combined regression table for Jama
 
# remove step
envATReportingStep1$workflow$removeStep('Modeling/Step 10/59463')
## seq_len(nrow(df)): 1
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 2
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 3
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 4
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 5
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 6
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 7
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 8
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 9
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 10
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 11
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 12
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 13
## NULL
## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
## seq_len(nrow(df)): 14
## NULL

# check whether step is still present in workflow
envATReportingStep1$workflow$df() %>%
  filter(str_detect(fullName, regex("Step 10"))) %>%
  select(fullName, sourceEntityId, rationale, description) 
## [1] fullName       sourceEntityId rationale      description   
## <0 rows> (or 0-length row.names)

The last output above confirms that the step was removed from the workflow. Importantly, however, note that the step is not deleted. It is still present in its analysis tree. The step was only removed from the workflow leading to Reporting/Step 1 as revealed in the output below. Applying loadChildResources() to an analysis tree’s ident returns, inter alia, all of its steps.

Get steps in Analysis Tree ’Modeling
#loadChildResources()` allows loading all steps of an analysis tree.
stepsATModeling <- improveR::loadChildResources(ident='/improve-tutorial/Modeling/') %>%
  select(data) %>%
  unnest(data) %>%
  select("name", "path")

#reveals that step 10 is still present
stepsATModeling
## # A tibble: 6 × 2
##   name    path                              
##   <chr>   <chr>                             
## 1 Step 10 /improve-tutorial/Modeling/Step 10
## 2 Step 6  /improve-tutorial/Modeling/Step 6 
## 3 Step 8  /improve-tutorial/Modeling/Step 8 
## 4 Step 9  /improve-tutorial/Modeling/Step 9 
## 5 Step 7  /improve-tutorial/Modeling/Step 7 
## 6 Step 1  /improve-tutorial/Modeling/Step 1

4 Updating outdated workflow elements

In the event that elements of an workflow get outdated, these and all other steps in their usage need updating. The function rerunChangedAndOutdated() performs incremental workflow execution by only rerunning steps with changed or feature outdated files as well as their consumers. It is hence a powerful function to keep the workflow in sync, without having to rerun it entirely.

To demonstrate this, the following steps are implemented below:

  1. Get the workflow of step Reporting/Step 1
  2. Check for the presence of any changed or outdated files with changedAndOutdatedFiles()
  3. Call rerunChangedAndOutdated.
Change step to render workflow outdated
#get workflow 
envATReportingStep1 <- getStep("/improve-tutorial/Reporting/Step 1")
envATReportingStep1$lineage$load(treeDepth=-1, stepDepth=-1)
## 2025-10-14 11:59:44.589482 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to lineage
## 2025-10-14 11:59:45.416507 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to lineage
## 2025-10-14 11:59:46.35447 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to lineage
## 2025-10-14 11:59:47.366107 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to lineage
## 2025-10-14 11:59:48.467839 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to lineage
## 2025-10-14 11:59:49.790209 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to lineage
## 2025-10-14 11:59:51.234457 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to lineage
## 2025-10-14 11:59:52.691208 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to lineage
## 2025-10-14 11:59:54.150775 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to lineage
## 2025-10-14 11:59:55.549386 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to lineage
## 2025-10-14 11:59:57.631153 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to lineage
## 2025-10-14 11:59:59.669295 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to lineage
## 2025-10-14 12:00:03.463901 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to lineage
## 2025-10-14 12:00:06.705797 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to lineage
## 2025-10-14 12:00:47.28699 INFO::Token refreshed via OAuth

#get changed and outdated files
changedAndOutdatedFiles <- envATReportingStep1$workflow$changedAndOutdatedFiles()
nrow(changedAndOutdatedFiles)
## [1] 18
changedAndOutdatedFiles %>% 
  select(fileName, stepEntityId, outdatedLink, targetId) %>%
  arrange(fileName)
##               fileName                                    stepEntityId outdatedLink                         targetId
## 1      modWtAgeSex.RDS  envhost1.hc.scintecodev.internal-5310:ST-59463         TRUE CB8C298D6EE84F5C8069BF16E0D5162A
## 2      modWtAgeSex.RDS  envhost1.hc.scintecodev.internal-5310:ST-54678         TRUE CB8C298D6EE84F5C8069BF16E0D5162A
## 3          remData.csv  envhost1.hc.scintecodev.internal-5310:ST-54744         TRUE F90CD2AE979D41CCB5473A867E309DB9
## 4  remDataDuration.csv  envhost1.hc.scintecodev.internal-5310:ST-54049         TRUE AC2BE2774F104E3DBA39D8ECF843A6C9
## 5  remDataDuration.csv  envhost1.hc.scintecodev.internal-5310:ST-57280         TRUE AC2BE2774F104E3DBA39D8ECF843A6C9
## 6  remDataDuration.csv envhost1.hc.scintecodev.internal-5310:ST-111581         TRUE AC2BE2774F104E3DBA39D8ECF843A6C9
## 7  remDataDuration.csv  envhost1.hc.scintecodev.internal-5310:ST-59046         TRUE AC2BE2774F104E3DBA39D8ECF843A6C9
## 8   remDataQuality.csv  envhost1.hc.scintecodev.internal-5310:ST-54047         TRUE 4351AD478CDC435F9D3AC0C9C3C9FE55
## 9   remDataQuality.csv  envhost1.hc.scintecodev.internal-5310:ST-54049         TRUE 406D405BA4AD4C359AC4ABC7AB467067
## 10      remDataStd.csv  envhost1.hc.scintecodev.internal-5310:ST-75706         TRUE 1D825613B1D94E2FAB56573F7DABF755
## 11      remDataStd.csv  envhost1.hc.scintecodev.internal-5310:ST-54627         TRUE 1D825613B1D94E2FAB56573F7DABF755
## 12  remDataSubject.csv  envhost1.hc.scintecodev.internal-5310:ST-57280         TRUE A0A1B697500A4B1FA9B0539E76E0174E
## 13  remDataSubject.csv envhost1.hc.scintecodev.internal-5310:ST-111581         TRUE A0A1B697500A4B1FA9B0539E76E0174E
## 14  remDataSubject.csv  envhost1.hc.scintecodev.internal-5310:ST-59046         TRUE A0A1B697500A4B1FA9B0539E76E0174E
## 15  remDataSubject.csv  envhost1.hc.scintecodev.internal-5310:ST-54651         TRUE 0D01FDA2C1984E88AFF213C4209F0173
## 16  remDataSubject.csv  envhost1.hc.scintecodev.internal-5310:ST-54675         TRUE 0D01FDA2C1984E88AFF213C4209F0173
## 17  remDataSubject.csv  envhost1.hc.scintecodev.internal-5310:ST-54672         TRUE 0D01FDA2C1984E88AFF213C4209F0173
## 18  remDataSubject.csv  envhost1.hc.scintecodev.internal-5310:ST-54635         TRUE 0D01FDA2C1984E88AFF213C4209F0173
Rerun changed and outdated files
envATReportingStep1$workflow$rerunChangedAndOutdated()

The result above reveals that there are 18 outdated files or links in the workflow leading (directly or indirectly) to Reporting/Step 1. Note that a file can appear multiple times in changedAndOutdatedFiles. This is because the same file is linked multiple times to different steps. The targetId refers to the file to which the link is direct to. However, since the link is outdated the returned targetId refers to the previous, i.e. outdated id of the file.

5 Workflow templates

Working with workflows in {improveR} is not limited to the creation and (re)execution of workflows, but also allows for using already existing workflows as a template which can then be adapted as needed.

Create a template based on an existing workflow
envATReportingStep1 <- getStep("improve-tutorial/Reporting/Step 1")
envATReportingStep1$lineage$load(treeDepth=-1)
## 2025-10-15 17:30:17.67876 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to lineage
## 2025-10-15 17:30:19.310202 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to lineage
## 2025-10-15 17:30:21.42002 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to lineage
## 2025-10-15 17:30:23.154714 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to lineage
## 2025-10-15 17:30:24.881165 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to lineage
## 2025-10-15 17:30:27.436823 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to lineage
## 2025-10-15 17:30:29.715644 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to lineage
## 2025-10-15 17:30:32.412344 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to lineage
## 2025-10-15 17:30:34.748651 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to lineage
## 2025-10-15 17:30:37.05728 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to lineage
## 2025-10-15 17:30:40.8849 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to lineage
## 2025-10-15 17:30:44.084532 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to lineage
## 2025-10-15 17:30:50.339444 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to lineage
## 2025-10-15 17:30:54.472875 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to lineage
workflowDf <- envATReportingStep1$workflow$df()

fullLineageWFTemplate <- envATReportingStep1$workflow$createTemplate()
fullLineageWFTemplate
## <environment: 0x0000024c5d0163f8>

5.1 Modifying steps of a workflow template

Once the template has been created, it is possible to modify various attributes of the template workflow.

For steps, the modifications are specified by using the template’s stepTemplates binding and addressing the relevant step. The IDE’s autocompletion expedites this process.

Get details on step inside the created workflow template
fullLineageWFTemplate$stepTemplates$`Reporting/Step 1/62516`$stepDf
##                                 handle                                                                                                                                                                                                                                                             processes                        treeIdent  treeName          treePath                       description                                 sourceEntityId sourceName                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          remoteFiles               fullName
## 1 c53b4cd3-274b-497b-a010-3d9037b5bd26 c53b4cd3-274b-497b-a010-3d9037b5bd26, runserver, R_4.2, rstudio, -e\r\nIMPROVER_TOKEN=<jwt>\r\n-e\r\nIMPROVER_STEP=<step-entityId>\r\n-e\r\nIMPROVER_REPO_URL=<repoUrl>\r\nscinteco/imrstudio:1.2.0blatest, *.txt\r\n*.out\r\n*.Rout, TRUE, TRUE, TRUE, Main, main, 1 9978BAEF59D8403C86FEB9E8379DF557 Reporting /improve-tutorial Collect results and create report envhost1.hc.scintecodev.internal-5310:ST-62516     Step 1 c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, c53b4cd3-274b-497b-a010-3d9037b5bd26, envhost1.hc.scintecodev.internal-5310:FI-114626, envhost1.hc.scintecodev.internal-5310:FI-59429, envhost1.hc.scintecodev.internal-5310:FI-63428, envhost1.hc.scintecodev.internal-5310:FI-63391, envhost1.hc.scintecodev.internal-5310:FI-63429, envhost1.hc.scintecodev.internal-5310:FI-111400, envhost1.hc.scintecodev.internal-5310:FI-59533, envhost1.hc.scintecodev.internal-5310:FI-59100, envhost1.hc.scintecodev.internal-5310:FI-59096, envhost1.hc.scintecodev.internal-5310:FI-63432, envhost1.hc.scintecodev.internal-5310:FI-114736, envhost1.hc.scintecodev.internal-5310:FI-63396, envhost1.hc.scintecodev.internal-5310:FI-59532, envhost1.hc.scintecodev.internal-5310:FI-59425, envhost1.hc.scintecodev.internal-5310:FI-63422, envhost1.hc.scintecodev.internal-5310:FI-63397, envhost1.hc.scintecodev.internal-5310:FI-59095, envhost1.hc.scintecodev.internal-5310:FI-111403, envhost1.hc.scintecodev.internal-5310:FI-62615, envhost1.hc.scintecodev.internal-5310:FI-62517, 29E506A49244436591E58827B0C6E3DE, B11B0B2539804E7AAA485AE671D258B6, 064DD8764ED8459D9B0D2C0433AC2D89, 719F5E1D63434847BD821C9A5E47D2C6, 76DA78F37AEE44B6A24999B522F2606A, E57631FC548B4F28B67B17746C19F8F3, 03B3DFE0AB5F4D019B403FE62AE684FE, 7F2DBEE04A57407EAFB6FE6AF596F4E1, 8CCAA30628584F778558106366914C5A, 03B3DFE0AB5F4D019B403FE62AE684FE, 29E506A49244436591E58827B0C6E3DE, 719F5E1D63434847BD821C9A5E47D2C6, D5947162F380454CBDF32F7232BF2FFB, B497E09D348E41A49DF5F0B79E291718, 86BDDEF1EAC045F18484E9796BF206B4, 719F5E1D63434847BD821C9A5E47D2C6, 8CCAA30628584F778558106366914C5A, E57631FC548B4F28B67B17746C19F8F3, NA, NA, F7099CD1D479ACD3CD53038EB1108FD1BFAEC6520B15424842AD0F7905A2F56A, 2CDB461892E3B37B379F27A0A9B44204802346FE384EE34EBDEF5DFAB1B466A0, 49FE4F2FADBF8B65AF01D39707B68CACD1221512A76A23142A363733DBB83184, 5BC97DB2904191C71827881BC5391FC0872888B39DEF5705FC0B5D24099CC8D2, F75CDD12CAD35DBE491F40699FCB7A0117189B019BD2256989C007D73ACD5724, 034175FC70E453B951D629EBFAF95D0DC431A8C0A85209D13743559753FA846C, 1AA45C62A5DFB1ECB77B729C9794C06670CE6250BB103D48AC33976F8C542248, 77F02D18E8720FB0F9446D325A27C672AEF8B1EBA7621659E07AEF7580AE1564, 512600E0F11AE627F97B06C4FCD05985C0141A9B56647E1D00BA18946F121960, 5DEE495B8D1CBAE9FF936C8892F4FC8C95F6AE82AE1614D1E568091F62B6FC28, 0526BDE7F84406FA4AF32B339375B5B3A48D902561EB9AC1DFA9A43004AC2669, 4B36FD99D60C4C4D3B8E3AA410FCDED8560B49FFB67D0F69CC3935EAD1B79118, 3B0F8559646D6B479EC060D9DB84020D9370DCB0F4DAD2B578705A672FF6DB13, 2B0C0FD63180073E19FE04DFADB86E732DC56BE9FDB1A0D4C246B4F36E0FFE8A, 01A5B56A4A9B58E51279EEFADCD5EBE98208FFC36866DD6CF5B24F328E4CDDEE, 9A9E502B6CD8989A48ACEC0EB00F9F50F1CDD96A7ACE9C37D016A8B26AA77C22, D593D4EB00AA8C5CD0C37BD7E16F1B95B0C66EC29E3019EF91A4065F93793E51, C7C6198FF1264130FC17259EE8FE602B8B6821CC4AD8FC69E92793B79BE23EE6, 159DE9608E2FB2C8493574B9A8AE446EA06AB43FE14BF5A53CB1CD64191BDF3C, C087D89993CF67B7C2EDB23B04E05DB1B5FD9898D46CD824AEE4E6F802E8725C, 29E506A49244436591E58827B0C6E3DE, B11B0B2539804E7AAA485AE671D258B6, 064DD8764ED8459D9B0D2C0433AC2D89, 719F5E1D63434847BD821C9A5E47D2C6, 76DA78F37AEE44B6A24999B522F2606A, E57631FC548B4F28B67B17746C19F8F3, 03B3DFE0AB5F4D019B403FE62AE684FE, 7F2DBEE04A57407EAFB6FE6AF596F4E1, 8CCAA30628584F778558106366914C5A, 03B3DFE0AB5F4D019B403FE62AE684FE, 29E506A49244436591E58827B0C6E3DE, 719F5E1D63434847BD821C9A5E47D2C6, D5947162F380454CBDF32F7232BF2FFB, B497E09D348E41A49DF5F0B79E291718, 86BDDEF1EAC045F18484E9796BF206B4, 719F5E1D63434847BD821C9A5E47D2C6, 8CCAA30628584F778558106366914C5A, E57631FC548B4F28B67B17746C19F8F3, NA, NA, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, ./graphPerformanceModWt.png, ./graphPerformanceModWtSex.png, ./tabmodWtSexEstimates.png, ./tableStatsAll.png, ./tabmodWtAgeEstimates.png, ./missingDataLocationFrequency.png, ./graphPerformanceModWtAgeSex.png, ./graphDistributionSexAge.png, ./graphConcentrationDurationSubject.png, ./tabmodWtAgeSexEstimates.png, ./tabmodWtEstimates.png, ./tableStatsAge.png, ./graphPerformanceModWtAge.png, ./graphModelComparison.png, ./tableResultsCompared.png, ./tableStatsSex.png, ./graphConcentrationDuration.png, ./missingData.png, ./report.html, ./report.qmd, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, command-file, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, Main, F7099CD1D479ACD3CD53038EB1108FD1BFAEC6520B15424842AD0F7905A2F56A, 2CDB461892E3B37B379F27A0A9B44204802346FE384EE34EBDEF5DFAB1B466A0, 49FE4F2FADBF8B65AF01D39707B68CACD1221512A76A23142A363733DBB83184, 5BC97DB2904191C71827881BC5391FC0872888B39DEF5705FC0B5D24099CC8D2, F75CDD12CAD35DBE491F40699FCB7A0117189B019BD2256989C007D73ACD5724, 034175FC70E453B951D629EBFAF95D0DC431A8C0A85209D13743559753FA846C, 1AA45C62A5DFB1ECB77B729C9794C06670CE6250BB103D48AC33976F8C542248, 77F02D18E8720FB0F9446D325A27C672AEF8B1EBA7621659E07AEF7580AE1564, 512600E0F11AE627F97B06C4FCD05985C0141A9B56647E1D00BA18946F121960, 5DEE495B8D1CBAE9FF936C8892F4FC8C95F6AE82AE1614D1E568091F62B6FC28, 0526BDE7F84406FA4AF32B339375B5B3A48D902561EB9AC1DFA9A43004AC2669, 4B36FD99D60C4C4D3B8E3AA410FCDED8560B49FFB67D0F69CC3935EAD1B79118, 3B0F8559646D6B479EC060D9DB84020D9370DCB0F4DAD2B578705A672FF6DB13, 2B0C0FD63180073E19FE04DFADB86E732DC56BE9FDB1A0D4C246B4F36E0FFE8A, 01A5B56A4A9B58E51279EEFADCD5EBE98208FFC36866DD6CF5B24F328E4CDDEE, 9A9E502B6CD8989A48ACEC0EB00F9F50F1CDD96A7ACE9C37D016A8B26AA77C22, D593D4EB00AA8C5CD0C37BD7E16F1B95B0C66EC29E3019EF91A4065F93793E51, C7C6198FF1264130FC17259EE8FE602B8B6821CC4AD8FC69E92793B79BE23EE6, NA, NA, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, Reporting/Step 1/62516, NA, NA, graphPerformanceModWt.png, graphPerformanceModWtSex.png, tabmodWtSexEstimates.png, tableStatsAll.png, tabmodWtAgeEstimates.png, missingDataLocationFrequency.png, graphPerformanceModWtAgeSex.png, graphDistributionSexAge.png, graphConcentrationDurationSubject.png, tabmodWtAgeSexEstimates.png, tabmodWtEstimates.png, tableStatsAge.png, graphPerformanceModWtAge.png, graphModelComparison.png, /tableResultsCompared.png, tableStatsSex.png, graphConcentrationDuration.png, missingData.png, NA, NA, Modeling/Step 1/54635, Modeling/Step 6/54651, Modeling/Step 6/54651, EDA/Step 15/57280, Modeling/Step 7/54672, DataOrder/Step 3/54627, Modeling/Step 8/54675, EDA/Step 17/59046, EDA/Step 6/54049, Modeling/Step 8/54675, Modeling/Step 1/54635, EDA/Step 15/57280, Modeling/Step 7/54672, Modeling/Step 9/54678, Modeling/Step 1/54635, EDA/Step 15/57280, EDA/Step 6/54049, DataOrder/Step 3/54627, NA, NA Reporting/Step 1/62516
Figure 5: Improve client - DMG across all steps, grouped by analysis trees

Below an example, where a step’s description inside of the workflow template is changed.

Modifying steps of a workflow template
# show original description of step
fullLineageWFTemplate$stepTemplates$`Reporting/Step 1/62516`$stepDf$description
## [1] "Collect results and create report"

# change description
fullLineageWFTemplate$stepTemplates$`Reporting/Step 1/62516`$setStepDescription(description="Description in new workflow template")

# show new description
fullLineageWFTemplate$stepTemplates$`Reporting/Step 1/62516`$stepDf$description
## [1] "Description in new workflow template"

Similarly, attributes pertaining to the entire workflow can be specified. Below, the root folder of the template workflow is defined. The value is stored in treePath of each of the template’s steps. Similarly, a tree name for the workflow template can be defined. The pertaining value is stored in treeName.

Set attributes for template workflow
#Workflow root folder
fullLineageWFTemplate$setWorkflowTreeRootFolder("newTreeRootFolder") 
fullLineageWFTemplate$stepTemplates$`Reporting/Step 1/62516`$stepDf$treePath
## [1] "newTreeRootFolder"

#Workflow tree name
fullLineageWFTemplate$setWorkflowTreeName("newTreeName")
fullLineageWFTemplate$stepTemplates$`Reporting/Step 1/62516`$stepDf$treeName
## [1] "newTreeName"

Overall, there is a comprehensiv set of additional functions within the stepTemplates binding of the workflow template to add, change, get, remove, or set the various properties of a template’s step. This allows tailoring each of the template’s step to the specific requirements

## [1] "addExtLink, addProcessValue, addStepGridArgument, addStepLineage, addStepLocalFile, addStepRemoteFile, addStepValue"
## [1] "changeStepLocalFile, changeStepProcessDf, changeStepRemoteFile, changeStepRemoteFileDf"
## [1] "getStepEnv, getStepResource, getStepState, getStepValue, getToolForProcess"
## [1] "removeProcessValue, removeStepGridArguments, removeStepLocalFile, removeStepRemoteFile, removeStepValue"
## [1] "setProcessValue, setStepBreakpoint, setStepCommandLine, setStepDescription, setStepFinishCondition, setStepName, setStepParent, setStepRationale, setStepReuse, setStepRunserverLabel, setStepToolInstance, setStepToolLabel, setStepTree, setStepValue, setStepWorkflow"

5.2 Realizing a workflow template

Until this point, the workflow template has been existing only in the workflow’s environment. To move from a workflow template to an actual new workflow, the template has to be ‘realized’. Below an example which

  1. creates a workflow template for the step DataOrder/Step 6.
  2. creates a pertaining template
  3. sets the root folder of the template to the same folder as the initial workflow
  4. sets the analysis tree, in which the realised workflow template will be located to ‘newWorkflow’
  5. Realises the workflow
Realize workflow template
# get the worklfow
envATDOStep6 <- getStep("improve-tutorial/DataOrder/Step 6")
envATDOStep6$lineage$load(treeDepth=-1)
## 2025-10-15 17:32:03.453506 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to lineage
## 2025-10-15 17:32:04.844974 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to lineage
workflowDf <- envATDOStep6$workflow$df()

# create the template
fullLineageWFTemplate <- envATDOStep6$workflow$createTemplate()

# define the folder/path and the tree of where the template should be realized
pathFolder <- loadResource("/improve-tutorial")$path
fullLineageWFTemplate$setWorkflowTreeRootFolder(pathFolder) 
fullLineageWFTemplate$setWorkflowTreeName("newWorkflow")

# realize the template
fullLineageWFTemplate$realise()
## 2025-10-15 17:32:06.166899 INFO::Using realise_deprecated for repository version 4.3.3-9
## 2025-10-15 17:32:06.170878 INFO::newWorkflow already exists in /improve-tutorial
## 2025-10-15 17:32:46.759994 INFO::waiting to finish
## 2025-10-15 17:32:57.605249 INFO::Using realise_deprecated for repository version 4.3.3-9
## 2025-10-15 17:32:57.609354 INFO::newWorkflow already exists in /improve-tutorial
## 2025-10-15 17:33:31.217603 INFO::waiting to finish
## 2025-10-15 17:33:47.332902 INFO::Using realise_deprecated for repository version 4.3.3-9
## 2025-10-15 17:33:47.3367 INFO::newWorkflow already exists in /improve-tutorial
## <environment: 0x0000024c5793c548>

After the code’s execution the elements of the new workflow appear in the newly created analysis tree. The chunk below loads the analysis tree ‘newWorkflow’ and presents the contained steps.

Show elements of newly ‘realized’ workflow template
loadChildResources(ident="/improve-tutorial/newWorkflow") %>%
  select(data) %>%
  unnest(data) %>%
  select(name, path, entityId)
## # A tibble: 57 × 3
##    name    path                                  entityId                                       
##    <chr>   <chr>                                 <chr>                                          
##  1 Step 31 /improve-tutorial/newWorkflow/Step 31 envhost1.hc.scintecodev.internal-5310:ST-111830
##  2 Step 22 /improve-tutorial/newWorkflow/Step 22 envhost1.hc.scintecodev.internal-5310:ST-111800
##  3 Step 26 /improve-tutorial/newWorkflow/Step 26 envhost1.hc.scintecodev.internal-5310:ST-111814
##  4 Step 32 /improve-tutorial/newWorkflow/Step 32 envhost1.hc.scintecodev.internal-5310:ST-111834
##  5 Step 12 /improve-tutorial/newWorkflow/Step 12 envhost1.hc.scintecodev.internal-5310:ST-111649
##  6 Step 46 /improve-tutorial/newWorkflow/Step 46 envhost1.hc.scintecodev.internal-5310:ST-114543
##  7 Step 2  /improve-tutorial/newWorkflow/Step 2  envhost1.hc.scintecodev.internal-5310:ST-111616
##  8 Step 42 /improve-tutorial/newWorkflow/Step 42 envhost1.hc.scintecodev.internal-5310:ST-114518
##  9 Step 53 /improve-tutorial/newWorkflow/Step 53 envhost1.hc.scintecodev.internal-5310:ST-114666
## 10 Step 16 /improve-tutorial/newWorkflow/Step 16 envhost1.hc.scintecodev.internal-5310:ST-111662
## # ℹ 47 more rows

For example, contrasting the content of two inventories shows that they are equal when it comes to the files’ names.

Steps are identical
dataNewWorkflowStep3 <- loadChildResources("improve-tutorial/newWorkflow/Step 3")$data[[1]]
nrow(dataNewWorkflowStep3)
## [1] 9
dataOrderStep3 <- loadChildResources("improve-tutorial/DataOrder/Step 3")$data[[1]]
nrow(dataOrderStep3)
## [1] 9

setequal(dataNewWorkflowStep3$name, dataOrderStep3$name)
## [1] TRUE

5.3 Exporting a workflow template

To export a workflow into a file the function binding toJSON can be called.

Export workflow to json
fullLineageWFTemplate$toJSON("fullLineageWF.json")
## 2025-10-15 17:34:21.347405 INFO::Workflow template saved to:  fullLineageWF.json
Code
knitr::knit_exit()