Description Usage Arguments Details Value Warning Author(s) See Also Examples
The function creates a ggene
object from a genind
object and a data frame containing the coordinates.
1 | gene2geo(X, coord)
|
X |
A |
coord |
A data frame containing the coordinates of the individuals. |
Genetic data are contained in the genind
object. Such objects can be created from various file formats (genepop, genetix...) using the package adegenet
.
An object of class ggene
with 5 items:
tab |
Data frame of the dummy variable coding for the presence of each allele. The number of rows is the number of individuals, the number of columns is the total number of alleles (all locus pooled). |
coord |
The x and y cordinates (longitude and latitude). |
nloc |
Number of different locus. |
loc |
The number of different alleles per locus. |
locnames |
The names of the different locus. |
This function is intended be used to manage diploid data ONLY. Haploid data are not supported by gene2geno
and should be handled using tab2geo
. Caution is needed as regards missing data (NAs). NAs must be removed or replaced prior to analysing the dataset.
One option developped in the package adegenet
is to replace NAs by the NAs by the mean allele frequency.
ggene
has no function to handle NAs in raw data and users are referred to the package adegenet and its function scaleGen
.
This function will allow processing diploid data as a genind
object. For haploid datasets, NAs removal must be done directly by users.
Jean-Pierre Rossi <ggene.package@gmail.com>
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.