#' Check for standards
#'
#' @param df The data frame to check for standards.
#' @param formulation.var The variable to inspect.
#'
#' @return A logical vector of rows corresponding to standards.
#' @export
#' @importFrom magrittr %<>% %>%
#' @importFrom dplyr mutate_if
#'
#' @examples
#' standards <- some.df[is.standard(some.df),]
is.standard <- function(df, formulation.var = "Formulation") {
df %<>% mutate_if(is.factor, as.character)
df[,formulation.var] %>%
unlist %>%
startsWith("S")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.