na.omit.loci | R Documentation |
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
.
## S3 method for class 'loci'
na.omit(object, na.alleles = c("0", "."), ...)
nullAlleles2NA(object, na.alleles = c("0", "."))
object |
an object of class |
na.alleles |
a vector of character strings giving the alleles to be treated as missing data. |
... |
(unused) |
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
.
an object of class "loci"
.
Emmanuel Paradis
data(jaguar)
nrow(jaguar)
nrow(na.omit(jaguar))
nrow(nullAlleles2NA(jaguar))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.