This function is designed to isolate one or more structure(s) from a list of DVH lists according to user input.
Usage
## S3 method for class 'DVH.list'
subset(x, structure, patient, ID, constraint, ignore.case=TRUE, select)
Arguments
x
Represents a DVH.list object (e.g. generated by read.DVH()).
structure
Vector used to sub-select structures from x; may be a character vector containing structure names (regular expressions may be specified if desired, see regex for more details).
patient
Vector used to sub-select specific patient data from x; may be a character vector containing patient names (regular expressions may be specified if desired, see regex for more details).
ID
Vector used to sub-select specific patient data from x using exact matching on patient identifiers.
constraint
Vector of one or more dosimetric constraints to apply to x to assess whether or not each component DVH should be included in the resultant list. More than one parameter may be specified at a time. Parameter specification should be of the form "<A><B><C> <?> <D>(<E>)": <A> is equivalent to "V" or "D", representing a volume or dose, respectively; <B> usually denotes a numerical value specifying the dose or volume; <C> represents the dose or volume units ("cGy", "Gy", "%", or "cc"); <?> represents a logical comparator (e.g. ">=" or "<" or "!="); <D> represents a comparative value; and <E> represents the units of comparison (e.g. "%" or "Gy"). An example would be "V20Gy < 50(%)" which represents a test of whether or not the volume of the structure receiving at least 20Gy dose is less than 50% of the overall structure volume. Dose ranges may also be specified, for instance "V10-20Gy" or "V<20Gy". Specialized dosimetric keywords may also be used: "Dmax" (maximum dose), "Dmin" (minimum dose), "Dmean" (mean dose), "Dmedian" (median dose), "Dintegral" (estimated integral dose), "DRx" (prescription dose), and "volume" (total structure volume). If an improper parameter is specified however, NA results will be returned. See package documentation (vignette) for more details.
ignore.case
Logical value specifying whether or not to use case-sensitive pattern matching; if TRUE (default), case is ignored during matching, and if FALSE, the pattern matching is case sensitive.
select
Must be one of "all" (default), "any", or "none". This value specifies the how to combine multiple selection inputs. When select = "all", a given DVH is only included in the resulting DVH list when it matches with all specififed inputs (for instance, must be a specific structure from a specific patient). When select = "any", a DVH may be included in the result DVH list if it matches any specified inputs. When select = "none", a DVH will only be included int eh resulting DVH list if it does not match with any of the specified criteria. For more details, see examples, below.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RadOnc)
Loading required package: rgl
Loading required package: geometry
Loading required package: magic
Loading required package: abind
Loading required package: oro.dicom
oro.dicom: Rigorous - DICOM Input / Output (version = 0.5.0)
Loading required package: ptinpoly
Loading required package: misc3d
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RadOnc/subset.Rd_%03d_medium.png", width=480, height=480)
> ### Name: subset.DVH.list
> ### Title: Extract a subset of a larger DVH list
> ### Aliases: subset-methods subset.DVH.list subset,DVH-method
> ### subset,DVH.list-method
> ### Keywords: methods manip
>
> ### ** Examples
>
> data(list="RadOnc", package="RadOnc")
> subset(johndoe, structure="kidney", constraint="Dmean < 500(cGy)", ignore.case=TRUE)
[1] "List containing 1 DVH objects (LEFT_KIDNEY)"
> subset(johndoe, constraint="volume > 200(cc)")
[1] "List containing 4 DVH objects (LIVER, SMALL_BOWEL, STOMACH, BODY)"
>
>
>
>
> dev.off()
null device
1
>