get.distance: Calculate Nei distance between two or more population

Description Usage Arguments Value Examples

View source: R/get.distance.R

Description

Function to calculate Nei's distance between two or more population

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
get.distance(
  population,
  type = "nei",
  marker = "all",
  per.marker = FALSE,
  gen1 = NULL,
  database1 = NULL,
  cohorts1 = NULL,
  gen2 = NULL,
  database2 = NULL,
  cohorts2 = NULL,
  database.list = NULL,
  gen.list = NULL,
  cohorts.list = NULL
)

Arguments

population

population list

type

Chose type of distance to compute (default: Neis standard genetic distance "nei"). Alt: Reynolds distance ("reynold"), Cavalli-Sforza ("cavalli"), Neis distance ("nei_distance"), Neis minimum distance ("nei_minimum")

marker

Vector with SNPs to consider (Default: "all" - use of all markers)

per.marker

Set to TRUE to return per marker statistics on genetic distances

gen1

Quick-insert for database (vector of all generations to consider)

database1

First Groups of individuals to consider

cohorts1

Quick-insert for database (vector of names of cohorts to consider)

gen2

Quick-insert for database (vector of all generations to consider)

database2

Second Groups of individuals to consider

cohorts2

Quick-insert for database (vector of names of cohorts to consider)

database.list

List of databases to consider (use when working with more than 2 populations)

gen.list

Quick-insert for database (vector of all generations to consider)

cohorts.list

Quick-insert for database (vector of names of cohorts to consider)

Value

Population list

Examples

1
2
data(ex_pop)
get.distance(ex_pop, database1 = cbind(1,1), database2 = cbind(1,2))

MoBPS documentation built on Nov. 9, 2021, 5:08 p.m.

Related to get.distance in MoBPS...