subset: Extract a subset of a larger DVH list

subset.DVH.listR Documentation

Extract a subset of a larger DVH list

Description

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.

Value

Returns a single DVH list

Author(s)

Reid F. Thompson (reid.thompson@gmail.com)

See Also

DVH.list

Examples

data(list="RadOnc", package="RadOnc")
subset(johndoe, structure="kidney", constraint="Dmean < 500(cGy)", ignore.case=TRUE)
subset(johndoe, constraint="volume > 200(cc)")

reidt03/RadOnc documentation built on Sept. 29, 2022, 9:50 a.m.