R/common_elements.R

Defines functions common.elements

Documented in common.elements

#' Common elements
#'
#' Finds if vectors have common elements.
#'
#' @param a first vector
#' @param b second vector
#' @export

common.elements <- function(a,b) {
  x <- a %in% b
  out <- any(x==TRUE)
  return(out)
}
jakubnowicki/artificialmorpho documentation built on May 18, 2019, 11:17 a.m.