R/match.dat.fun.R

match.dat.fun <-
function(dat1, dat2){
  ids=as.matrix(unique(dat1[, 1]))
  n.len=length(ids)
  res=NULL
  for(i in 1:n.len){
    idx=(dat2[,1]==ids[i])
    dat.i=dat2[idx, ]
    res=rbind(res, dat.i)
  }
  return(res)
}

Try the SPREDA package in your browser

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

SPREDA documentation built on May 2, 2019, 4 p.m.