R/extract_coef.R

Defines functions extract_coef

Documented in extract_coef

#' Fit Hill Equation to nested data
#'
#' @param nest_name
#'
#' @return
#' @export
#'
#' @examples

extract_coef <- function(data, nest_key){

  nest_key = enquo(nest_key)

    mutate(coeffs = coef(drm_model) %>%
                          as.list %>%
                          as_tibble) %>%
    unnest(coeffs) %>%
    mutate(pCa50 = log10(`ec50:(Intercept)`)) %>%
    rename(hillslope = `hillslope:(Intercept)`,
           vmax = 'vmax:(Intercept)',
           molar_ec50 = 'ec50:(Intercept)') %>%
    mutate(predictions = map(drm_model, predict_hill))
}
brentscott93/biophysr documentation built on Sept. 14, 2021, 2:35 a.m.