View source: R/lol.r View source: R/ldr.R
lol | R Documentation |
Take lists of x and y, return the upper limit of linearity.
lol(x, y, rsq = "0.95", min_dils = 3, force_origin = FALSE)
x |
independent variable, e.g. concentration or dilution |
y |
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 compound |
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) %>% summarise(intb_max = lol(intb))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.