ldr | R Documentation |
Take grouped tibble with x and y colnames, also rsq_min value. Return same tibble with each group truncated to the linear dynamic range.
ldr( dildata, x = "dil", y = "intb", rsq = 0.95, min_dils = 3, force_origin = FALSE )
x |
name of independent variable, e.g. concentration or dilution |
y |
name of dependent variable, e.g. into or intb |
rsq |
minimum R^2 at which signal is considered linear |
min_dils |
minimum number of unique x values (dilutions) that must be present for a group |
force_origin |
Force regression through the origin? Set T for pre-blanked data, otherwise F. |
a named list:
$y_max
: maximum y
for which R^2 >= rsq
$n_dils
: number of dilutions used in the linreg
$rr
: R^2 of the linreg
# NTS: can put slope and intercept in here too, if need be
# use inside a dplyr::summarise() call ldrs_roi <- areas_all %>% group_by(roi) %>% ldr(rsq = 0.95, min_dils = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.