R/experimental.R

Defines functions experimental

Documented in experimental

#' Subset only experimental treatments
#'
#' This is almost the opposite of \code{standards}, but it excludes \code{NA}s.
#'
#' @param df The data frame to subset.
#' @param ... Additional parameters passed to \code{is.standard}.
#'
#' @return A subsetted data frame containing only nonstandard formulations.
#' @export
#' @importFrom magrittr %>%
#' @importFrom dplyr filter
#' @importFrom stats complete.cases
#'
#' @examples
#' experimental <- experimental(some.df)
experimental <- function(df, ...) {
  df[!is.standard(df),] %>% filter(complete.cases(.))
}
Aehmlo/lucy documentation built on Oct. 30, 2019, 4:09 a.m.