R/rowmatch.r

Defines functions rowmatch

rowmatch <- function(A,B) { 
  # Rows in A that match the rows in B 
  f <- function(...) paste(..., sep=":") 
  if(!is.matrix(B)) B <- matrix(B, 1, length(B)) 
  a <- do.call("f", as.data.frame(A)) 
  b <- do.call("f", as.data.frame(B)) 
  match(b, a) 
} 

Try the BoolFilter package in your browser

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

BoolFilter documentation built on May 2, 2019, 1:27 p.m.