Data {wombsoft} | R Documentation |
Data preparation
Description
Read a text file with coordinates and markers in columns and individuals in rows.
Usage
DataDominant(input_file,conversion,nb_x,nb_y,output_coords="coord_km.txt")
DataCodominant(input_file,conversion,nb_x,nb_y,output_coords="coord_km.txt")
DataContingency(input_file,conversion,nb_x,nb_y,output_coords="coord_km.txt")
Arguments
input_file |
Path of the input text file.
For dominant or codominant data, each row contains the name of the individual, the two coordinates (either abscissa and ordinates, or longitude and
latitude), and the genetic data in succession.
For contingency table, each row corresponds to a sampled point, with the name of the point, its coordinates, and the number of individuals for each modality of each variable. |
conversion |
0 if the coordinates are cartesians, 1 if they are in degree and therefore need to be converted to cartesians. |
nb_x,nb_y |
number of pixels in width and length of the grid. |
output_coords |
the name of the file where the kilometer coordinates will be saved in. Default value is "coord_indiv.txt". |
Value
a list of six items :
spatial coordinates of individuals |
a matrix with one line per individual, and two columns containing abscissa and ordinates of individuals, (x,y). |
genetic_encoded |
the genetic data, containing one column per locus. If data are dominant, it's the same table as the input file. |
grid |
a list of the vector of x, and the vector of y. |
cvx_vertices |
the vertices of the convex hull of sampling area (same format than individuals coordinates). |
cvx_matrix |
a matrix containing a 1 if the corresponding point of the grid is in the convex hull, and a 0 otherwise. |
nb_individual |
the number of individuals in the dataset. |
[Package
wombsoft version 2.0
Index]