[adegenet-forum] Handling Missing Spatial Data in genind2genpop
Maile C Neel
mneel at umd.edu
Sat Nov 4 22:35:31 CET 2017
Apologies if this seemingly simple question has been answered before. I
have found nothing from extensive searches of manuals and adegenet archives.
In my data set of 1,110+ individuals from 25 sites, a few individuals at 2
sites lack GPS coordinates. For pairwise comparisons of individuals that
require coordinates, I eliminate samples with missing location data.
However, when I am collapsing the data set to populations using
genind2genpop I would like to keep the genetic data from all samples and
ignore the NA values in the genind at other$utms slot. If even one sample in
a population is missing utm coordinates, the population values are NA
I want the population centroid returned to the genpop at other$utms slot to be
the mean of the samples that DO have utm coordinates. The distances among
populations are so large that any error introduced by a small number of
missing locations will not affect my results.
I know how to specify a basic function for other.action (e.g.,
other.action=mean), but I can't see how to specify something like
na.remove, na.omit, or complete.cases that would calculate the mean
ignoring missing data.. Another option would be to replace missing
@other$utms values with mean values for the population based on complete
cases from within the genind2genpop call, but that also does not appear to
be possible.
Is there an easy way to keep all my genetic observations and get a
population centroids ignoring missing coordinates?
____________
Maile Neel
Professor; Director of the Norton-Brown Herbarium
University of Maryland
Department of Plant Science and Landscape Architecture &
Department of Entomology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20171104/ba5dd98c/attachment.html>
More information about the adegenet-forum
mailing list