throwoutKin: Function finds non related individuals.

Description Usage Arguments Author(s) Examples

Description

For each individual, remove kin based on treshold value (see Blouin 2003). Data comes from software coancestry (Jinliang Wang).

Usage

1
throwoutKin(data, treshold)

Arguments

data

data.frame A data.frame with columns (in this order) animal1, animal2 and stat.

treshold

numeric A numeric vector of length one. Individuals with comparison value of >= treshold will be removed from the data set.

Author(s)

Roman Lustrik, Maja Jelencic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
  kin <- read.table("./sandbox/RelatednessCI95.Txt", sep = ",")
  animal <- kin[, c(2, 3, 6)]
  names(animal) <- c("animal1", "animal2", "stat")

  suppressMessages(rez <- throwoutKin(data = animal, treshold = 0.5))
  str(rez)
  length(rez$unique.animals) # number of unique animals
  str(rez$cleaned.data) # structure of cleaned data
  hist(rez$cleaned.data$stat) # histogram of stat values from cleaned data
                              # should all be below treshold

## End(Not run)

romunov/zvau documentation built on May 27, 2019, 1:50 p.m.