Learn R Programming

pegas (version 1.1)

na.omit.loci: Missing Allelic Data

Description

This is a method of the generic function na.omit.

Usage

# S3 method for loci
na.omit(object, na.alleles = c("0", "."), ...)

Value

an object of class "loci".

Arguments

object

an object of class "loci".

na.alleles

a vector of charater strings giving the alleles to be treated as missing data.

...

(unused)

Author

Emmanuel Paradis

Details

The side effect of this function is to drop the rows (individuals) with unclearly identified genotypes, i.e., with at least one allele among na.alleles.

Other variables in the data table are eventually checked and levels with no observation (e.g., population) are dropped.

Examples

Run this code
data(jaguar)
nrow(jaguar)
nrow(na.omit(jaguar))

Run the code above in your browser using DataLab