Defines functions homogenize.to.parentals

Documented in homogenize.to.parentals

homogenize.to.parentals <-
function(x, parents, window){
  #d1 <- data.frame(matrix(parents, nrow=1))
  alls <- numeric()
  for(i in 1:length(x$wei)){
    bb <- abs(x$wei[i] - parents)
    bb2 <- which(bb < window)[1]
      alls[i] <- x$wei[1]
    }else{alls[i] <- parents[[bb2]]}
  x$wei <- alls
  # returns alleles but in parental conformation

Try the Fragman package in your browser

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

Fragman documentation built on Jan. 14, 2018, 5:04 p.m.