knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
growr helps you with the pieces of growth curve analysis.
preprocess()
fit_*()
metric_*()
functions:fit_nls(formula = )
3Currently, growr has high level interface that is meant to be simple with reasonable defaults:
preprocess()
transform raw measures data into values suitable for summarization.summarise_fit()
summarise a fit method into growth-curve metrics such as the fit's $A$, $\mu$, $\lambda$.add_grouping()
and add_groupings()
provide a convenient way to add relationships between sets of wells of a microtitre plate. Reference and target well designations can then be used to rescale summary metrics within groups (with for example, the provided relatively()
).growr also exports an extensive set of models that make up a low level interface. Nearly all these functions have previously been used in growth curve analyses. The majority of this functionality is not new. It reflects a collection from various public source from this author's exploration. Citations provided in documentation of the individual methods.
preprocess()
takes a vector of values and returns a transformed version. The details of the transformation depend on the argument choices but follows the preprocessing steps laid out in the precog paper.
library(tidyverse) library(growr) data <- mtpview::mtp_example3 data data %>% group_by(well) %>% mutate(measure_pp = preprocess(measure))
# well_summaries <- data %>% # group_by(well) %>% # mutate(measure_pp = preprocess(measure)) %>% # summarise(metrics = list(summarise_fit(x = runtime, y = measure_pp))) %>% # unnest(cols = c(metrics)) # well_summaries
add_groupings()
takes one or more strings with grouping shorthand, expands them and joins them onto the provided data. The source well(s)
->target well(s)
. Sets of wells are specified with the familiar rectanuglar colon style notation: A01:A12
is expanded to contain row A wells from column 1 to column 12 inclusive.
# well_summaries %>% # add_groupings(c("A01->A02:A12", "B01:H01->B02:H12"), nrow = 8, ncol = 12)
A more complex example (using the internal fxn for demonstration of the parsing that goes on under the hood of add_groupings()
)
# growr:::parse_grouping('p1!A01,B01:B04,H03->A01:H12', 8 , 12)
Rescale you data by group, for example:
# well_summaries %>% # add_groupings(c("A01->A02:A12", "B01:H01->B02:H12"), nrow = 8, ncol = 12) %>% # group_by(group) %>% # mutate(relative_mu = relatively(mu, is_ref))
# install.packages("growr") remotes::install_github("npjc/growr")
growr
provides many model choices, but you may want to add your own. For this
reason there is a standard way to add a new model interface
new_model_fxn <- function(x, y, ...) { model_obj <- fit_new_model(x, y, ...) output <- list(model = model_summary, component = component_summary, observation = observation_summary ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.