R/compare.R

Defines functions lower over equal

Documented in equal lower over

#' Compare two vectors
#'
#' @param a one vector
#' @param b the other vector
#' @name compare
#' @return the compared object
#' @export
#'
#' @examples
#' equal(letters,c('a','b'))
equal <- function(a,b){
    a[a %in% b]
}
#' @export
#' @rdname compare
#' @examples
#' over(1:10,5)
over <- function(a,b){
    a[a>b]
}
#' @export
#' @rdname compare
#' @examples
#' over(1:10,5)
lower <- function(a,b){
    a[a<b]
}

Try the do package in your browser

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

do documentation built on Aug. 3, 2021, 5:06 p.m.