Learn R Programming

DVHmetrics (version 0.3.1)

showDVH: Display dose volume histograms

Description

Displays dose volume histograms: Either one diagram per patient - including multiple structures. Or one diagram per structure - including multiple patients.

Usage

showDVH(x, cumul=TRUE, byPat=TRUE, patID=NULL, structure=NULL,
        rel=TRUE, guessX=TRUE, thresh=1, show=TRUE, ...)

## S3 method for class 'DVHs':
showDVH(x, cumul=TRUE, byPat=TRUE, patID=NULL, structure=NULL,
        rel=TRUE, guessX=TRUE, thresh=1, show=TRUE, ...)

## S3 method for class 'DVHLst':
showDVH(x, cumul=TRUE, byPat=TRUE, patID=NULL, structure=NULL,
        rel=TRUE, guessX=TRUE, thresh=1, show=TRUE, ...)

## S3 method for class 'DVHLstLst':
showDVH(x, cumul=TRUE, byPat=TRUE, patID=NULL, structure=NULL,
        rel=TRUE, guessX=TRUE, thresh=1, show=TRUE, ...)

Arguments

x
A single DVH (object of class DVHs), multiple DVHs from one patient/structure (object of class DVHLst), or multiple DVHs from many patients/structures (object of class DVHLstLst). See
cumul
Show cumulative or differential DVH?
byPat
Relevant if multiple DVHs are given. If x has class DVHLstLst: byPat=TRUE means that one diagram shows DVHs from one patient with multiple structures. byPat=FALSE means that one diagram shows DVHs for on
patID
character vector. Show diagram for these patients only. If missing, all patients are shown. Can be a regular expression, see regex.
structure
character vector. Show diagram for these structures only. If missing, all structures are shown. Can be a regular expression, see regex.
rel
logical. Show relative volume?
guessX
logical. Try to clip the x-axis for better visibility of main DVH range?
thresh
numeric value. Relative volume threshold used with guessX=TRUE. Clip x-axis (+10%) such that the "highest" DVH is cut off at this relative volume.
show
logical. If TRUE, diagrams are shown, if FALSE diagrams are not shown - only ggplot diagram objects are silently returned.
...
Further arguments passed to code{grep}. Use fixed=TRUE for exact matching of patID and structure.

Value

  • Silently returns a ggplot diagram object, or - when multiple diagrams are constructed - a list of ggplot diagram objects.

Details

If multiple diagrams are produced, they are shown in the same graphics device. If interactive inspection is required, make sure you use an R development environment that saves previous diagrams and allows navigating between them - e.g., http://www.rstudio.com/products/rstudio/download/{RStudio} or http://www.openanalytics.eu/downloads/architect{OpenAnalytics Architect}.

See Also

ggplot, readDVH, saveDVH

Examples

Run this code
showDVH(dataMZ, byPat=TRUE, structure=c("HEART", "AMYOCL"))
showDVH(dataMZ, byPat=FALSE, patID="23")  # matches P123 and P234

Run the code above in your browser using DataLab