Add a Log(dose) (in base 10) Column to the Input data.frame
calculate_log_dose.Rd
Given the dose as a column in a data.frame
with a given
molar concentration add a new column of the log base-10 dose,
log_dose
, in the data.frame
and return it.
Value
input data.frame
with an appended log_dose
column
which is the log10(<dose_col>) * molar_concentration
.
Examples
if (FALSE) { # \dontrun{
# Consider observations at doses of 1 μM and 0.1 μM.
# If the doses are given in molar units (M) then
data <- data.frame(dose = c(1e-6, 1e-7)) |>
BayesPharma::calculate_log_dose(dose_col = dose, molar_concentration = 1)
data$log_dose == c(-6, -7)
# If the doses are given with in units of nanomolar (nM) then
data <- data.frame(dose_nM = c(1000, 100)) |>
BayesPharma::calculate_log_dose(
dose_col = dose_nM,
molar_concentration = 1e-9)
data$log_dose == c(-6, -7)
} # }