Description Usage Arguments Details Value See Also Examples
setContinDiscrete
: convert volumes, measured in original units, to intervals.
setPercentDiscrete
: convert volumes, measured in percent change, to intervals.
setRateDiscrete
: convert volumes, measured in rate change, to intervals.
setBaselineDiscrete
: convert baseline volumes, measured in original units, to intervals.
1 2 3 4 5 6 7 | setContinDiscrete(volumes, categories = 10)
setPercentDiscrete(volumes, categories = 10)
setRateDiscrete(volumes, categories = 10)
setBaselineDiscrete(volumes, categories = 10)
|
volumes |
a dataframe, rows are tumor volumes |
categories |
number of categories or a vector with boundaries (all values outside the boundaries will be set to NA). |
Volumes are discretized into 10 intervals, where each is an event. Event names are named after the intervals. Note:
intervals are based on distribution of values in volumes
each interval or bin will be used as different categories of tumor volume
also see prepTumorVol
volumes
contains tumor measurement events as rows and at least the following columns:
agent_detail = event attribute, i.e., measured tumor volume in mm3 char
volumes
with eventName
as an additional column
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | data("fake_data")
vols <- fake_data$events[fake_data$events$agent=='measurement', ]
# format data
vols$startdate <- as.Date(as.character(vols$startdate), format='%Y-%m-%d')
vols$enddate <- as.Date(as.character(vols$enddate), format='%Y-%m-%d')
vols <- resetEventIDsToDays(vols)
vols <- removeData(vols) # get rid of excess details and empty or no data
vols_dist <- setContinDiscrete(vols)
data("fake_data")
vols <- fake_data$events[fake_data$events$agent=='measurement', ]
# format data
vols$startdate <- as.Date(as.character(vols$startdate), format='%Y-%m-%d')
vols$enddate <- as.Date(as.character(vols$enddate), format='%Y-%m-%d')
vols <- resetEventIDsToDays(vols)
vols <- removeData(vols) # get rid of excess details and empty or no data
# convert vol to correct type for all patients
vols <- split(vols, vols$iois) # list of dataframes, where each is a patient's set of tumor volumes
vols <- lapply(vols, function(v) setPercentChange(v))
vols <- do.call('rbind', vols)
# discretize
vols_dist <- setPercentDiscrete(vols)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.