getRTV: Helper function to calculate the relative tumor volume from...

View source: R/getRTV.R

getRTVR Documentation

Helper function to calculate the relative tumor volume from an imput data frame of tumor growth

Description

getRTV is a helper function used inside lmmModel() to obtain a dataframe with a column RTV corresponding to the relative tumor volume to time time_start, and a column logRTV with the logarithm of RTV.

Usage

getRTV(data, time_start)

Arguments

data

Data frame with the tumor growth data. The input data frame columns have to have the following names:

  • SampleID: Column with the identifiers for each sample.

  • Time: Column with the time for each measurement.

  • TV: Column with the tumor volume measurement.

time_start

Numeric value indicating the time at which the treatment started.

Value

The function returns the original data frame of tumor growth data, with 3 additional columns, corresponding to:

  • RTV: Relative tumor volume to the tumor volume at start_time.

  • logRTV: Logarithm of RTV column.

  • TV0: Tumor volume at start_time.

Examples

# Load example dataset
data("grwth_data")
# Change column names
colnames(grwth_data) <- c("SampleID", "Time", "Treatment", "TV")
# Calculate relative tumor volume
getRTV(data = grwth_data, time_start = 0)


SynergyLMM documentation built on April 4, 2025, 4:13 a.m.