na.omit.loci {pegas} | R Documentation |
Missing Allelic Data
Description
The first function is a method of the generic function
na.omit
.
nullAlleles2NA
changes all genotypes with at least one ‘null’
allele (that is among the values in na.alleles
) into NA
.
Usage
## S3 method for class 'loci'
na.omit(object, na.alleles = c("0", "."), ...)
nullAlleles2NA(object, na.alleles = c("0", "."))
Arguments
object |
an object of class |
na.alleles |
a vector of character strings giving the alleles to be treated as missing data. |
... |
(unused) |
Details
The side effect of na.omit
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.
nullAlleles2NA
does not remove any observation but changes
these genotypes into NA
.
Value
an object of class "loci"
.
Author(s)
Emmanuel Paradis
Examples
data(jaguar)
nrow(jaguar)
nrow(na.omit(jaguar))
nrow(nullAlleles2NA(jaguar))
[Package pegas version 1.3 Index]