define_arrow_layout: Create arrow connections between compartments

View source: R/define_arrow_layout.R

define_arrow_layoutR Documentation

Create arrow connections between compartments

Description

Combine information for each arrow's origin, destination, label, width, color and scaling into a data.frame.

Usage

define_arrow_layout(qmd_info = NULL, scaling = TRUE,
  arrow_scale_fun = function(x) {     x }, clearance_mode = FALSE,
  color_scaling = "RSE", color_cutoff = c(25, 50), labels = TRUE,
  parse_labels = TRUE, alpha = 1, arrow_color_manual = NULL,
  unscaled_color = NULL, font = "Avenir", arrow_fontsize = 1)

Arguments

qmd_info

a qmd_info object generated with import_qmd_info or skeleton_qmd_info

scaling

logical, if TRUE arrow width and colors will be scaled. If FALSE standard model diagram will be created

arrow_scale_fun

a function to be used for arrow width scaling

clearance_mode

logical if TRUE clearances will be represented by triangles and their surface area will be proportional to the volume cleared per unit of time

color_scaling

can be 'iiv', 'rse', 'none' or 'pbpk'

color_cutoff

numeric vector of length 2 setting the cutoff limits in color coding for RSE (%) or IIV (%)

labels

logical if TRUE labels are added to arrows

parse_labels

logical if TRUE labels will be parsed to use subscript for the rate constant, clearances and inter-compartmental clearances index

alpha

transparency factor

arrow_color_manual

manually set color for each arrow

unscaled_color

color of the unscaled compartments

font

font name of arrow labels

arrow_fontsize

font size expansion factor

Details

The default scaling_fun argument is set to scale the arrow width proportionally to the square root of the parameter value, to match the method used on volumes.

Value

A data.frame

See Also

define_comp_layout, import_qmd_info, qmd

Examples

## Not run: 
qmd_info <- import_qmd_info(dir = '../models/pk/', runno = '001')
arrow    <- define_arrow_layout(qmd_info)

## End(Not run)

guiastrennec/modelviz documentation built on Feb. 16, 2024, 8:14 p.m.