R/utils-pipe.R

Defines functions release_questions abortifnot

Documented in abortifnot

#' Pipe operator
#'
#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
NULL

#' Abort if not
#'
#' @param cnd Condition to be evaluated.
#' @param message Message to display if condition is false.
#'
#' @author João Macalós
#'
#' @keywords internal
#'
abortifnot <- function(cnd, message = NULL) {

  if (isFALSE(cnd)) rlang::abort(message)

}

#'
#' @keywords internal
#'
release_questions <- function() {
  c(
    "Have you check that all models are running without errors? The best way to check it is to \n
    wait for Travis to build and check the package's webpage. If there's an error in any model,\n
    the page will return a 404 error."
  )
}

Try the sfcr package in your browser

Any scripts or data that you put into this service are public.

sfcr documentation built on Oct. 11, 2021, 9:09 a.m.