Learn R Programming

dartR (version 1.1.11)

gl.merge.pop: Merge two or more populations in a genelight {adegenet} object into one population

Description

Individuals are assigned to populations based on the specimen metadata data file (csv) used with gl.read.dart().

Usage

gl.merge.pop(x, old = NULL, new = NULL, v = 2)

Arguments

x

-- name of the genlight object containing SNP genotypes or a genind object containing presence/absence data [required]

old

-- a list of populations to be merged [required]

new

-- name of the new population [required]

v

-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]

Value

A genlight object with the new population assignments

Details

This script assigns individuals from two nominated populations into a new single population. It can also be used to rename populations.

The script returns a genlight object with the new population assignments.

Examples

Run this code
# NOT RUN {
   gl <- gl.merge.pop(testset.gl, old=c("EmsubRopeMata","EmvicVictJasp"), new="Outgroup")
# }

Run the code above in your browser using DataLab