define_comp_layout: Create compartment layout

View source: R/define_comp_layout.R

define_comp_layoutR Documentation

Create compartment layout

Description

Combine information for each compartment's rank, label, size, color and scaling into a data.frame.

Usage

define_comp_layout(qmd_info = NULL, scaling = TRUE, rank = NULL,
  comp_scale_fun = function(x) {     sqrt(x) }, color_scaling = "RSE",
  color_cutoff = c(25, 50), filled = TRUE, alpha = 1,
  comp_color_manual = NULL, unscaled_color = NULL,
  unscaled_shape = "circle", scaled_shape = "square", font = "Avenir",
  comp_fontsize = 1)

Arguments

qmd_info

a qmd_info object generated with import_qmd_info or skeleton_qmd_info

scaling

logical if TRUE compartment size and colors will be scaled. If FALSE standard model diagram will be created

rank

integer vertor assigning a rank to each compartment. Can be used to obtain a specific layout. The ranks must be greater or equal to 1.

comp_scale_fun

a function to be used for compartment size scaling

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 (%)

filled

logical if TRUE compartment will be filled If FALSE only the compartment edges will be drawn

alpha

transparency factor

comp_color_manual

manually set color for each compartment

unscaled_color

color of the unscaled compartments

unscaled_shape

shape of the unscaled compartments. Can be square, circle or diamond

scaled_shape

shape of the scaled compartments. Can be square, circle or diamond

font

font name of the compartment label

comp_fontsize

font size expansion factor

Details

The default scaling_fun argument is set to be a surface area of the compartment.

Value

A data.frame

See Also

define_arrow_layout, import_qmd_info, qmd

Examples

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

## End(Not run)

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