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 relationships, 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 dependencies binding. The dependencies 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 dependencies 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 dependencies with desired depth
envATReportingStep1$dependencies$load(treeDepth=-1)
## 2025-11-26 06:13:56.76178 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to dependencies
## 2025-11-26 06:13:59.09567 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to dependencies
## 2025-11-26 06:14:01.367437 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to dependencies
## 2025-11-26 06:14:03.75392 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to dependencies
## 2025-11-26 06:14:05.376061 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to dependencies
## 2025-11-26 06:14:08.144625 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to dependencies
## 2025-11-26 06:14:10.451979 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to dependencies
## 2025-11-26 06:14:13.855026 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to dependencies
## 2025-11-26 06:14:16.207029 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to dependencies
## 2025-11-26 06:14:18.616597 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to dependencies
## 2025-11-26 06:14:23.532967 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to dependencies
## 2025-11-26 06:14:28.028039 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to dependencies
## 2025-11-26 06:14:35.539428 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to dependencies
## 2025-11-26 06:14:40.442356 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to dependencies

# 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 2, 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 dependencies leading to Reporting/Step 1. Would EDA/Step 18 be within the dependencies 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 dependencies with desired depth
envATReportingStep1$dependencies$load(stepDepth=1)
## 2025-11-26 06:15:49.16224 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to dependencies
## 2025-11-26 06:15:50.094387 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to dependencies
## 2025-11-26 06:15:51.103179 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to dependencies
## 2025-11-26 06:15:52.293516 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to dependencies
## 2025-11-26 06:15:53.406251 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to dependencies
## 2025-11-26 06:15:54.770591 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to dependencies
## 2025-11-26 06:15:56.277891 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to dependencies
## 2025-11-26 06:15:57.889356 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to dependencies
## 2025-11-26 06:15:59.377528 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to dependencies
## 2025-11-26 06:16:00.823964 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to dependencies

# 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 ./missingDataLocationFrequency.png missingDataLocationFrequency.png DataOrder/Step 3/54627 Reporting/Step 1/62516
## 2                  ./missingData.png                  missingData.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 ./missingDataLocationFrequency.png envhost1.hc.scintecodev.internal-5310:FI-111400 TRUE  
## 2 ./missingData.png                  envhost1.hc.scintecodev.internal-5310:FI-111403 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$dependencies$load(treeDepth=-1)
## 2025-11-26 06:16:06.331553 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to dependencies
## 2025-11-26 06:16:07.152237 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to dependencies
## 2025-11-26 06:16:08.083206 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to dependencies
## 2025-11-26 06:16:09.086763 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to dependencies
## 2025-11-26 06:16:10.129079 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to dependencies
## 2025-11-26 06:16:11.381552 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to dependencies
## 2025-11-26 06:16:12.811717 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to dependencies
## 2025-11-26 06:16:14.226214 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to dependencies
## 2025-11-26 06:16:15.700196 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to dependencies
## 2025-11-26 06:16:17.139909 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to dependencies
## 2025-11-26 06:16:19.383048 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to dependencies
## 2025-11-26 06:16:21.590774 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to dependencies
## 2025-11-26 06:16:25.405026 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to dependencies
## 2025-11-26 06:16:27.902539 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to dependencies

# 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: 17 × 2
##    name    path                              
##    <chr>   <chr>                             
##  1 Step 6  /improve-tutorial/Modeling/Step 6 
##  2 Step 8  /improve-tutorial/Modeling/Step 8 
##  3 Step 7  /improve-tutorial/Modeling/Step 7 
##  4 Step 20 /improve-tutorial/Modeling/Step 20
##  5 Step 21 /improve-tutorial/Modeling/Step 21
##  6 Step 22 /improve-tutorial/Modeling/Step 22
##  7 Step 25 /improve-tutorial/Modeling/Step 25
##  8 Step 10 /improve-tutorial/Modeling/Step 10
##  9 Step 23 /improve-tutorial/Modeling/Step 23
## 10 Step 24 /improve-tutorial/Modeling/Step 24
## 11 Step 9  /improve-tutorial/Modeling/Step 9 
## 12 Step 27 /improve-tutorial/Modeling/Step 27
## 13 Step 26 /improve-tutorial/Modeling/Step 26
## 14 Step 19 /improve-tutorial/Modeling/Step 19
## 15 Step 1  /improve-tutorial/Modeling/Step 1 
## 16 Step 29 /improve-tutorial/Modeling/Step 29
## 17 Step 28 /improve-tutorial/Modeling/Step 28

4 Updating outdated workflow elements

In the event that elements of a 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 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$dependencies$load(treeDepth=-1, stepDepth=-1)
## 2025-11-26 06:17:27.260446 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to dependencies
## 2025-11-26 06:17:28.144282 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to dependencies
## 2025-11-26 06:17:29.108127 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to dependencies
## 2025-11-26 06:17:30.127302 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to dependencies
## 2025-11-26 06:17:31.22721 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to dependencies
## 2025-11-26 06:17:32.502613 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to dependencies
## 2025-11-26 06:17:33.948171 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to dependencies
## 2025-11-26 06:17:35.467114 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to dependencies
## 2025-11-26 06:17:36.979778 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to dependencies
## 2025-11-26 06:17:38.354647 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to dependencies
## 2025-11-26 06:17:40.679791 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to dependencies
## 2025-11-26 06:17:42.848998 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to dependencies
## 2025-11-26 06:17:46.671404 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to dependencies
## 2025-11-26 06:17:49.108971 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to dependencies
## 2025-11-26 06:18:40.806422 INFO::Token refreshed via OAuth

#get changed and outdated files
changedAndOutdatedFiles <- envATReportingStep1$workflow$changedAndOutdatedFiles()
nrow(changedAndOutdatedFiles)
## [1] 73
changedAndOutdatedFiles %>% 
  select(fileName, stepEntityId, outdatedLink, targetId) %>%
  arrange(fileName)
##                           fileName                                   stepEntityId outdatedLink                         targetId
## 1                        .gridhost envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 2                        .gridhost envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 3                        .gridhost envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 4                        .gridhost envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 5                        .gridhost envhost1.hc.scintecodev.internal-5310:ST-59463           NA                             <NA>
## 6                        .gridhost envhost1.hc.scintecodev.internal-5310:ST-54678           NA                             <NA>
## 7                          Model.r envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 8                          Model.r envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 9                          Model.r envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 10                         Model.r envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 11                      Rplots.pdf envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 12                      Rplots.pdf envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 13                      Rplots.pdf envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 14                      Rplots.pdf envhost1.hc.scintecodev.internal-5310:ST-54678           NA                             <NA>
## 15                     _STDERR.txt envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 16                     _STDERR.txt envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 17                     _STDERR.txt envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 18                     _STDERR.txt envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 19                     _STDERR.txt envhost1.hc.scintecodev.internal-5310:ST-59463           NA                             <NA>
## 20                     _STDERR.txt envhost1.hc.scintecodev.internal-5310:ST-54678           NA                             <NA>
## 21                     _STDOUT.txt envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 22                     _STDOUT.txt envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 23                     _STDOUT.txt envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 24                     _STDOUT.txt envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 25                     _STDOUT.txt envhost1.hc.scintecodev.internal-5310:ST-59463           NA                             <NA>
## 26                     _STDOUT.txt envhost1.hc.scintecodev.internal-5310:ST-54678           NA                             <NA>
## 27            getModelComparison.r envhost1.hc.scintecodev.internal-5310:ST-59463           NA                             <NA>
## 28            getModelComparison.r envhost1.hc.scintecodev.internal-5310:ST-54678           NA                             <NA>
## 29        graphModelComparison.png envhost1.hc.scintecodev.internal-5310:ST-54678           NA                             <NA>
## 30        graphModelComparison.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE 9CE98960DFAC4FC5AA467753D0A8119E
## 31       graphPerformanceModWt.png envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 32       graphPerformanceModWt.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE 53E099ABB47E4418ADF45FF0A9103998
## 33    graphPerformanceModWtAge.png envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 34    graphPerformanceModWtAge.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE B162A27064274EB295317C539C834755
## 35 graphPerformanceModWtAgeSex.png envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 36 graphPerformanceModWtAgeSex.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE 5FABD64B673446FD95DCCC46E5F9CB11
## 37    graphPerformanceModWtSex.png envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 38    graphPerformanceModWtSex.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE 7ED781EB31F64726A72CD38DECA9EBAB
## 39                       modWt.RDS envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 40                       modWt.RDS envhost1.hc.scintecodev.internal-5310:ST-59463         TRUE D44CE2137F1F491D93856D6950583BD3
## 41                       modWt.RDS envhost1.hc.scintecodev.internal-5310:ST-54678         TRUE D44CE2137F1F491D93856D6950583BD3
## 42                    modWtAge.RDS envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 43                    modWtAge.RDS envhost1.hc.scintecodev.internal-5310:ST-59463         TRUE 34ADDADA408E406088F56CA43E9CA4BD
## 44                    modWtAge.RDS envhost1.hc.scintecodev.internal-5310:ST-54678         TRUE 34ADDADA408E406088F56CA43E9CA4BD
## 45                 modWtAgeSex.RDS envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 46                 modWtAgeSex.RDS envhost1.hc.scintecodev.internal-5310:ST-59463         TRUE 89347CAAA67D490BAF97F8D8897B9B65
## 47                 modWtAgeSex.RDS envhost1.hc.scintecodev.internal-5310:ST-54678         TRUE 89347CAAA67D490BAF97F8D8897B9B65
## 48                    modWtSex.RDS envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 49                    modWtSex.RDS envhost1.hc.scintecodev.internal-5310:ST-59463         TRUE 44B1DA68A77349EBBD4900F340132CC0
## 50                    modWtSex.RDS envhost1.hc.scintecodev.internal-5310:ST-54678         TRUE 44B1DA68A77349EBBD4900F340132CC0
## 51             modelComparison.csv envhost1.hc.scintecodev.internal-5310:ST-54678           NA                             <NA>
## 52              remDataSubject.csv envhost1.hc.scintecodev.internal-5310:ST-54651        FALSE 688EF5807FD9433E84FE40BC53A602B4
## 53              remDataSubject.csv envhost1.hc.scintecodev.internal-5310:ST-54672        FALSE 688EF5807FD9433E84FE40BC53A602B4
## 54              remDataSubject.csv envhost1.hc.scintecodev.internal-5310:ST-54675        FALSE 688EF5807FD9433E84FE40BC53A602B4
## 55        tabModWtAgeEstimates.csv envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 56     tabModWtAgeSexEstimates.csv envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 57        tabModWtSexEstimates.csv envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 58       tableResultsCompared.html envhost1.hc.scintecodev.internal-5310:ST-59463           NA                             <NA>
## 59        tableResultsCompared.png envhost1.hc.scintecodev.internal-5310:ST-59463           NA                             <NA>
## 60        tableResultsCompared.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE 6A4E8EE6E0534F8E8218A2D7FDA6BE1E
## 61        tableResultsCompared.rtf envhost1.hc.scintecodev.internal-5310:ST-59463           NA                             <NA>
## 62       tabmodWtAgeEstimates.html envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 63        tabmodWtAgeEstimates.png envhost1.hc.scintecodev.internal-5310:ST-54672           NA                             <NA>
## 64        tabmodWtAgeEstimates.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE 2C09EFA01D9640F898CA97FFE93CBCAF
## 65    tabmodWtAgeSexEstimates.html envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 66     tabmodWtAgeSexEstimates.png envhost1.hc.scintecodev.internal-5310:ST-54675           NA                             <NA>
## 67     tabmodWtAgeSexEstimates.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE 7D7160D0F39C438EA7C3FA079769EE5E
## 68          tabmodWtEstimates.html envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 69           tabmodWtEstimates.png envhost1.hc.scintecodev.internal-5310:ST-54635           NA                             <NA>
## 70           tabmodWtEstimates.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE B511FB89DD2841E6A530C6D529A9596B
## 71       tabmodWtSexEstimates.html envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 72        tabmodWtSexEstimates.png envhost1.hc.scintecodev.internal-5310:ST-54651           NA                             <NA>
## 73        tabmodWtSexEstimates.png envhost1.hc.scintecodev.internal-5310:ST-62516         TRUE F374AF6C098D42AFAA05365BB7E571FD
Rerun changed and outdated files
envATReportingStep1$workflow$rerunChangedAndOutdated()

The result above reveals that there are 73 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 Exporting and Importing Workflows

5.1 Exporting

Calling exportWorkflow()

To export an already existing workflow, the following steps have to be taken:

  1. Get the step environment of the step to which the workflow leads.
  2. Load its dependencies (or usage) and define its scope using treeDepth and stepDepth. The workflow becomes available in the workflow binding.
  3. Call exportWorkflow() on the workflow element and assign a name to the export file.
Export workflow
# Get step environment
stepEnv <- getStep("/improve-tutorial/Reporting/Step 1")
# Load workflow
stepEnv$dependencies$load(treeDepth=-1, stepDepth=-1)
## 2025-12-16 12:25:10.056101 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54049 to dependencies
## 2025-12-16 12:25:12.379614 INFO::adding  Step 10 envhost1.hc.scintecodev.internal-5310:ST-59463 to dependencies
## 2025-12-16 12:25:15.2606 INFO::adding  Step 3 envhost1.hc.scintecodev.internal-5310:ST-54627 to dependencies
## 2025-12-16 12:25:17.59531 INFO::adding  Step 1 envhost1.hc.scintecodev.internal-5310:ST-54635 to dependencies
## 2025-12-16 12:25:19.29824 INFO::adding  Step 15 envhost1.hc.scintecodev.internal-5310:ST-57280 to dependencies
## 2025-12-16 12:25:22.58905 INFO::adding  Step 8 envhost1.hc.scintecodev.internal-5310:ST-54675 to dependencies
## 2025-12-16 12:25:25.056545 INFO::adding  Step 17 envhost1.hc.scintecodev.internal-5310:ST-59046 to dependencies
## 2025-12-16 12:25:28.503053 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-54651 to dependencies
## 2025-12-16 12:25:30.913913 INFO::adding  Step 7 envhost1.hc.scintecodev.internal-5310:ST-54672 to dependencies
## 2025-12-16 12:25:33.318927 INFO::adding  Step 9 envhost1.hc.scintecodev.internal-5310:ST-54678 to dependencies
## 2025-12-16 12:25:38.767141 INFO::adding  Step 4 envhost1.hc.scintecodev.internal-5310:ST-54744 to dependencies
## 2025-12-16 12:25:43.102476 INFO::adding  Step 2 envhost1.hc.scintecodev.internal-5310:ST-54625 to dependencies
## 2025-12-16 12:25:50.578202 INFO::adding  Step 5 envhost1.hc.scintecodev.internal-5310:ST-54047 to dependencies
## 2025-12-16 12:25:55.39602 INFO::adding  Step 6 envhost1.hc.scintecodev.internal-5310:ST-75706 to dependencies

# Export workflow
exportWorkflow(stepEnv$workflow, "workflowReportingStep1")
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0
## [1] 0

The exportWorkflow() function creates a portable, self-contained archive of a workflow. This ensures portability across different improve repositories and installations while maintaining regulatory compliance and data dependencies tracking. Unlike the toJSON() method which saves only the workflow structure and parameter definitions to a single JSON, exportWorkflow() produces all files needed to reconstruct and run the workflow in a new environment.

Files created by exportWorkflow()

More specifically, executing exportWorkflow() creates

  1. <workflowName>.zip: e.g., ‘workflowReportingStep1’
  2. <workflowName>LinkMapping.json: Configures how external resource references should be mapped
  3. <workflowName>ToolMapping.json: Configures how computational tool configurations should be mapped when importing into a target environment with different servers, tools, or resources

Peeking into content of the extracted .zip file, we can see that it contains

  • several folders with hashed names
  • workflow.json
  • internalLinks.json
  • links folder
Content of zip file

Each of the folders with a hashed name represents one specific step of the exported workflow. Each of them contains subfolders with the files that are inputs to or outputs from the step’s execution.

Show structure of zip file content
## workflowReportingStep1
## ├── 09992233-b3ab-4235-a311-14a926e4d945
## │   ├── inputFiles
## │   │   ├── getEDA.r
## │   │   ├── step-finished.txt
## │   │   ├── tableStatsAge.png
## │   │   ├── tableStatsAll.png
## │   │   ├── tableStatsSex.png
## │   │   └── _ENV_REPORT.txt
## │   └── outputFiles
## │       ├── graphDistributionSexAge.png
## │       ├── Rplots.pdf
## │       ├── tableStatsAge.html
## │       ├── tableStatsAge.rtf
## │       ├── tableStatsAll.html
## │       ├── tableStatsAll.rtf
## │       ├── tableStatsSex.html
## │       ├── tableStatsSex.rtf
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 177ae3cb-d33a-4c4f-8c1d-c349c8fc28c3
## │   ├── inputFiles
## │   │   └── checkData.R
## │   └── outputFiles
## │       ├── missingData.png
## │       ├── missingDataLocationFrequency.png
## │       ├── remDataQuality.csv
## │       ├── Rplots.pdf
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 32dfee93-93bb-43eb-b744-046ed79cf869
## │   ├── inputFiles
## │   │   ├── getEDA.r
## │   │   └── graphDistributionSexAge.png
## │   └── outputFiles
## │       ├── Rplots.pdf
## │       ├── tableStatsAgeJama.html
## │       ├── tableStatsAgeJama.rtf
## │       ├── tableStatsAllJama.html
## │       ├── tableStatsAllJama.rtf
## │       ├── tableStatsSexJama.html
## │       ├── tableStatsSexJama.rtf
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 48464b2e-8180-4543-879a-d1c74c24885c
## │   ├── inputFiles
## │   └── outputFiles
## │       ├── getModelComparison.r
## │       ├── tableResultsCompared.html
## │       ├── tableResultsCompared.png
## │       ├── tableResultsCompared.rtf
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 621e741c-26ef-47e3-ad39-ab28feb0fa00
## │   ├── inputFiles
## │   │   └── getSubjectData.r
## │   └── outputFiles
## │       ├── remDataDuration.csv
## │       ├── remDataSubject.csv
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 75c74ef3-1bcc-41a3-b026-47bc9917f8d5
## │   ├── inputFiles
## │   └── outputFiles
## │       ├── getModelComparison.r
## │       ├── graphModelComparison.png
## │       ├── modelComparison.csv
## │       ├── Rplots.pdf
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 82323c02-4499-4a9c-b2fb-5931ab9dd6d8
## │   ├── inputFiles
## │   └── outputFiles
## │       ├── graphPerformanceModWtAgeSex.png
## │       ├── Model.r
## │       ├── modWtAgeSex.RDS
## │       ├── Rplots.pdf
## │       ├── tabModWtAgeSexEstimates.csv
## │       ├── tabmodWtAgeSexEstimates.html
## │       ├── tabmodWtAgeSexEstimates.png
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 82c12db7-121f-4a8b-9037-a53431b9ef3b
## │   ├── inputFiles
## │   │   ├── report.html
## │   │   └── report.qmd
## │   └── outputFiles
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── 97823ac0-7578-494b-97ce-80a6e5d8697c
## │   ├── inputFiles
## │   └── outputFiles
## │       ├── graphPerformanceModWt.png
## │       ├── Model.r
## │       ├── modWt.RDS
## │       ├── tabmodWtEstimates.html
## │       ├── tabmodWtEstimates.png
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── ba6bc88e-1bb2-4aa1-9d41-995ad70b03ff
## │   ├── inputFiles
## │   │   └── standardizeNames.r
## │   └── outputFiles
## │       ├── remDataStd.csv
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── bb84a501-8687-4c46-9a1e-e68db5f5049b
## │   ├── inputFiles
## │   └── outputFiles
## │       ├── graphPerformanceModWtAge.png
## │       ├── Model.r
## │       ├── modWtAge.RDS
## │       ├── Rplots.pdf
## │       ├── tabModWtAgeEstimates.csv
## │       ├── tabmodWtAgeEstimates.html
## │       ├── tabmodWtAgeEstimates.png
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── dd2195b9-01b0-4199-a82f-b4a06f52d4ee
## │   ├── inputFiles
## │   │   └── checkData.R
## │   └── outputFiles
## │       ├── missingData.png
## │       ├── missingDataLocationFrequency.png
## │       ├── remDataQuality.csv
## │       ├── Rplots.pdf
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── ea58f618-1d24-45d5-a124-95737b893919
## │   ├── inputFiles
## │   └── outputFiles
## │       ├── graphPerformanceModWtSex.png
## │       ├── Model.r
## │       ├── modWtSex.RDS
## │       ├── Rplots.pdf
## │       ├── tabModWtSexEstimates.csv
## │       ├── tabmodWtSexEstimates.html
## │       ├── tabmodWtSexEstimates.png
## │       ├── _STDERR.txt
## │       └── _STDOUT.txt
## ├── f000e6a5-07a5-467e-93ae-fd2fe58c4980
## │   ├── inputFiles
## │   │   ├── getConcentrationOverTime.r
## │   │   └── _STDOUT.txt
## │   └── outputFiles
## │       ├── graphConcentrationDuration.png
## │       ├── graphConcentrationDurationSubject.png
## │       ├── Rplots.pdf
## │       └── _STDERR.txt
## ├── f1c779a0-49f9-49cb-9bfd-f17275405548
## │   ├── inputFiles
## │   │   ├── importData.R
## │   │   ├── _STDERR.txt
## │   │   └── _STDOUT.txt
## │   └── outputFiles
## │       └── remData.csv
## ├── internalLinks.json
## ├── links
## └── workflow.json

The workflow.json file is the core metadata file that contains complete
definitions for every step in the workflow. It serves as the blueprint
for reconstructing the entire workflow structure in a new environment.
Each element in the JSON array represents one workflow step. Unlike internalLinks.json which only tracks step-to-step connections, workflow.json contains the complete specification of each individual step including all its configuration, tool settings, and external file references. Together with the step folders (containing actual files) and internalLinks.json (defining dependencies), it provides everything needed to fully reconstruct and execute the workflow.

Show content of workflow.json
## [1] 15

The file internalLinks.json captures step-to-step dependencies within the workflow. Each element of the JSON file describes the link of one specific resource (e.g., a file) from a specific source step to a specific target step.

Show content of internalLinks.json
The unpacked zip file also contains a links folder. This folder stores external file dependencies that are referenced
by workflow steps but originate from outside the workflow itself (i.e., they are not outputs from other workflow steps). Since there are no external resources imported in the presented workflow, this folder is empty.

To sum up, exportWorkflow() creates a complete, self-contained archive of the requested workflow, which can be easily transferred to another repository.

5.2 Importing

The importWorkflow() function reconstructs a complete workflow from an exported zip archive into a target repository folder, recreating all steps, dependencies, and file relationships in the new environment.

What it processes:

  • Workflow structure: Reads workflow.json to reconstruct all step definitions with their complete metadata and configuration
  • Step dependencies: Processes internalLinks.json to restore step-to-step connections and execution order
  • External files: Uploads files from the links/ folder to the target repository or maps them to existing resources
  • Step files: Recreates each step with its inputFiles/ and outputFiles/ in the correct repository location
  • Parent relationships: Restores hierarchical step relationships when present

Environment adaptation:

The function uses optional mapping files to adapt the workflow to the target environment:

  • <workflowName>LinkMapping.json: Maps external file references to resources that already exist in the target repository, avoiding duplicate uploads
  • <workflowName>ToolMapping.json: Remaps computational tool configurations (servers, tool versions, instances) to match what is available in the target environment

These mappings are validated before import begins, and the import will abort if any mapped resources or tools cannot be found.

Import process:

The function systematically recreates the workflow by processing steps in dependencies order, ensuring that any step’s dependencies are created before the step itself. Each step is uploaded with its complete file inventory and execution history, maintaining data dependencies and regulatory compliance in the target repository.