R/genevec.R

Defines functions genevec

#' genevec
#'
#' @param one Sequence one
#' @param two Sequence two
#'
#' @noRd
#'
genevec <- function(one, two) {
  Nx <- length(one)
  Ny <- length(two)
  if (Nx != Ny) stop("Sequences must be the same length.")
  sum(duplicated(c(one, two)))
}

Try the rdiversity package in your browser

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

rdiversity documentation built on May 6, 2022, 9:06 a.m.