View source: R/rdm_residual_v11_TF_TQ.R
rdm_residual | R Documentation |
rdm_residual
: Reads the IBD residuals for each pair of individuals in a population (as calculated
by function rdm_IBD
) together with their geographic coordinates, and then creates a
3-D graph showing the residuals for each pair of individuals, represented as a line segment over the
landscape considered. The 3-D graph can be rotated to obtain a better view.
rdm_residual(IBD.res, Geo_raw, min.dist = 1, max.dist = Inf,
n_resolution = 50, proj = sp::CRS("+init=epsg:4326"))
IBD.res |
An object of class |
Geo_raw |
A string specifying the path to a text file showing the name (1st column) and geographical x and y coordinates (2nd and 3rd columns) of each individual (each row). The first row needs to specify the column headings, and all entries need to be tab-delimited. |
min.dist |
IBD residuals are only calculated for pairs of individuals that are separated by a distance greater
than |
max.dist |
IBD residuals are only calculated for pairs of individuals that are separated by a distance less
than |
n_resolution |
Specifies the number of cells that the landscape is divided into, for the purposes of creating
the 3-D plot. The landscape is divided into |
proj |
The coordinate system that is used for plotting. The default is EPSG 4326. |
An object of class SpatialLinesDataFrame
, containing coordinates of the line segments joining each
pair of individuals and the corresponding IBD residuals.
IBD_res <- rdm_IBD("files/genotypes.gen", "files/coordinates.txt")
rdm_residual(IBD_res, "files/coordinates.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.