Description Usage Arguments Value Author(s) References Examples
View source: R/normalize_to_first_timepoint.R
From a data.frame, extract a y-vector of responses and their x-vector of observation times. Normalize the y-vector to its first (based on the x-values) observation, subtract out the centering value from the entire normalized vector, and return the normalized, centered vector.
1 2 3 4 5 6 7 8 | normalize_to_first_timepoint(
DATA_FRAME,
x_name = "x",
y_name = "y",
average_multiple_obs = TRUE,
centering_value = 1,
scale_value = 100
)
|
DATA_FRAME |
data.frame with x-values (i.e, time-values) and y-values (responses. |
x_name |
character string with name of time value that order the responses. |
y_name |
character string with name of responses to be normalized to their own temporal baseline value. |
average_multiple_obs |
logical should we allow averaging of multiple baseline values, or call an error? |
centering_value |
numeric value to subtract from the normalized vector. |
scale_value |
numeric value by which to re-scale the normalized, centered vector. |
A numeric vector with normalized values.
Bill Forrest <forrest@gene.com>
Bill Forrest forrest@gene.com
1 2 3 4 5 6 | normalizing_test_data <- data.frame( x = seq(0,1,length = 11) )
normalizing_test_data$y <- 1 + 2 * exp(-normalizing_test_data$x)
normalized_output <-
data.frame( normalizing_test_data,
y_norm = maeve:::normalize_to_first_timepoint( normalizing_test_data )
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.