qmd: Automated creation and rendering of QMD graphs

View source: R/qmd.R

qmdR Documentation

Automated creation and rendering of QMD graphs

Description

Create and renders Quantitative Model Diagrams (QMD) for NONMEM models

Usage

qmd(qmd_info = NULL, scaling = TRUE, comp_scale_fun = function(x) {    
  sqrt(x) }, arrow_scale_fun = function(x) {     x }, labels = TRUE,
  parse_labels = TRUE, font = "Avenir", comp_fontsize = 1,
  arrow_fontsize = 1, filled = TRUE, alpha = 1, color_scaling = "RSE",
  color_cutoff = c(25, 50), arrow_color_manual = NULL,
  comp_color_manual = NULL, unscaled_color = NULL,
  unscaled_shape = "circle", scaled_shape = "square", flipped = FALSE,
  rank = NULL, title = NULL, clearance_mode = FALSE,
  pbpk_layout = FALSE, vein_comp_label = "venous",
  artery_comp_label = "arterial", save_qmd = FALSE, file_name = NULL,
  format = "svg", width = NULL, height = NULL, graph_attrs = NULL)

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

comp_scale_fun

a function to be used for compartment size scaling

arrow_scale_fun

a function to be used for arrow width scaling

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

font

font name of the compartment label

comp_fontsize

font size expansion factor

arrow_fontsize

font size expansion factor

filled

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

alpha

transparency factor

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

arrow_color_manual

manually set color for each arrow

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

flipped

logical if TRUE the layout will be flipped

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.

title

A title to be added to the graph

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

pbpk_layout

logical if TRUE a PBPK layout will be applied

vein_comp_label

label of the veinous compartment

artery_comp_label

label of the arterial compartment

save_qmd

save the QMD graph into a file (default FALSE)

file_name

name of the file to be created on the disk when save_qmd is TRUE

format

file format when save_qmd is TRUE. Must be one of "png", "pdf", "svg" or "ps"

width

width of the resulting graphic in pixels

height

height of the resulting graphic in pixels

graph_attrs

an optional data.frame of graph attribute statements that can serve as defaults for the graph.

See Also

import_qmd_info, format_qmd_info

Examples

## Not run: 
qmd(qmd_info, scaling = FALSE)

## End(Not run)

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