#' Preaverage plates
#'
#' The \code{Luminescence} column will be averaged for each \code{Formulation}.
#'
#' @param df The data frame on which to perform preaveraging.
#'
#' @return The preaveraged data frame.
#' @export
#' @importFrom magrittr %>%
#' @importFrom dplyr group_by summarize ungroup first
#'
#' @examples
#' pool_plates(some.df)
pool_plates <- function(df) {
df %>%
group_by(Plate, Formulation) %>%
summarize(Core = first(Core),
DOPE = first(DOPE),
Chol = first(Chol),
PEG = first(PEG),
Luminescence = mean(Luminescence)) %>%
ungroup
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.