View source: R/calculate-log-dose.R
calculate_log_dose | R Documentation |
data.frame
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.
calculate_log_dose(data, dose_col = "dose", molar_concentration = 1)
data |
|
dose_col |
|
molar_concentration |
|
input data.frame
with an appended log_dose
column
which is the log10(<dose_col>) * molar_concentration
.
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.