R: Plot a clean and scalable flowchart describing the (work)flow

plot_flow {flowr} | R Documentation

## Plot a clean and scalable flowchart describing the (work)flow

### Description

Plot a flowchart using a flow object or flowdef

### Usage

    plot_flow(x, ...)

    ## S3 method for class 'flow'
    plot_flow(x, ...)

    ## S3 method for class 'list'
    plot_flow(x, ...)

    ## S3 method for class 'character'
    plot_flow(x, ...)

    ## S3 method for class 'flowdef'
    plot_flow(x, detailed = TRUE, type = c("1", "2"),
      pdf = FALSE, pdffile, ...)

    ## S3 method for class 'flowdef'
    plot(x, detailed = TRUE, type = c("1", "2"),
      pdf = FALSE, pdffile, ...)

    ## S3 method for class 'flow'
    plot(x, ...)

### Arguments

`x` | Object of class `flow`, or a list of flow objects or a flowdef
`...` | experimental and only for advanced use.
`detailed` | include submission and dependency types in the plot [TRUE]
`type` | 1 is original, and 2 is a elipse with less details [1]
`pdf` | create a pdf instead of plotting interactively [FALSE]
`pdffile` | output file name for the pdf file. [`flow_path/flow_details.pdf`]

### Examples

    qobj = queue(type="lsf")
    cmds = rep("sleep 5", 10)
    jobj1 <- job(q_obj=qobj, cmd = cmds, submission_type = "scatter", name = "job1")
    jobj2 <- job(q_obj=qobj, name = "job2", cmd = cmds, submission_type = "scatter",
                 dependency_type = "serial", previous_job = "job1")
    fobj <- flow(jobs = list(jobj1, jobj2))
    plot_flow(fobj)

    ### Gather: many to one relationship
    jobj1 <- job(q_obj=qobj, cmd = cmds, submission_type = "scatter", name = "job1")
    jobj2 <- job(q_obj=qobj, name = "job2", cmd = cmds, submission_type = "scatter",
                 dependency_type = "gather", previous_job = "job1")
    fobj <- flow(jobs = list(jobj1, jobj2))
    plot_flow(fobj)

    ### Burst: one to many relationship
    jobj1 <- job(q_obj=qobj, cmd = cmds, submission_type = "serial", name = "job1")
    jobj2 <- job(q_obj=qobj, name = "job2", cmd = cmds, submission_type = "scatter",
                 dependency_type = "burst", previous_job = "job1")
    fobj <- flow(jobs = list(jobj1, jobj2))
    plot_flow(fobj)

[Package flowr version 0.9.10 Index]