Description Usage Arguments Details Value Warning Author(s) See Also Examples
The function create a ggene
object from a data frame containing the genetic data and a second data frame containing the coordinates.
1 | tab2geo(X, coord)
|
X |
A data frame with the genetic data of a set of individuals. Locus in columns, individuals as rows. |
coord |
A data frame containing the coordinates of the individuals. |
tab2geo
was written to handle haploid data which are not supported in the function gene2geo
.
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. |
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 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.