Learn R Programming

dartR (version 1.1.11)

gl.define.pop: Define a new population in a genelight {adegenet} object on the basis of specified individuals

Description

The script reassigns existing individuals to a new population and removes their existing population assignment

Usage

gl.define.pop(x, ind.list, new, v = 2)

Arguments

x

-- name of the genlight object containing SNP genotypes [required]

ind.list

-- a list of individuals to be assigned to the new population [required]

new

-- name of the new population

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 redefined population structure

Details

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

Examples

Run this code
# NOT RUN {
   gl <- gl.define.pop(testset.gl, ind.list=c("AA019073","AA004859"), new="newguys")
# }

Run the code above in your browser using DataLab