Learn R Programming

dartR (version 1.9.9.1)

gl.drop.ind: Remove specified individuals from a genelight {adegenet} object

Description

The script, having deleted individuals, optionally identifies resultant monomorphic loci or loci with all values missing and deletes them (using gl.filter.monomorphs.r). The script also optionally recalculates statistics made redundant by the deletion of individuals from the dataset.

Usage

gl.drop.ind(x, ind.list, recalc = FALSE, mono.rm = FALSE, verbose = NULL)

Arguments

x

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

ind.list

-- a list of individuals to be removed [required]

recalc

-- Recalculate the locus metadata statistics [default FALSE]

mono.rm

-- Remove monomorphic loci [default FALSE]

verbose

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

Value

A genlight object with the reduced data

Details

The script returns a genlight object with the individuals deleted and, optionally, the recalculated locus metadata.

See Also

gl.filter.monomorphs

gl.recalc.metrics

Examples

Run this code
# NOT RUN {
 # SNP data
    gl2 <- gl.drop.ind(testset.gl, ind.list=c("AA019073","AA004859"))
 # Tag P/A data
   gs2 <- gl.drop.ind(testset.gs, ind.list=c("AA020656","AA19077","AA004859"))
   gs2 <- gl.drop.ind(testset.gs, ind.list=c("AA020656","AA19077","AA004859"),
   mono.rm=TRUE, recalc=TRUE)
   
# }

Run the code above in your browser using DataLab