Description Usage Arguments Value Author(s) Examples
View source: R/Postprocessing.R
Plots several kinds of maps (environmental variable distribution, population structure, marker absence or presence, autocorrelation of marker). Unlike plotResultInteractive
, the resulting maps are non-interactive. The function can handle several marker/variables at once and create separate output files.
1 2 3 |
envFile |
char The file containing the input environmental variable of sambada. |
x |
char The name of the column corresponding to the x-coordinate in the |
y |
char The name of the column corresponding to the y-coordinate in the env file. Can be set to null if x is null. |
locationProj |
integer EPSG code of the geographical projection in the |
popStrCol |
char The name or vector of name of column(s) in |
gdsFile |
char The GDS file created in the preprocessing of sambada. If null, will try with |
markerName |
name of the marker to be plotter if |
mapType |
char A string or vector of string containing one or several of 'marker' (presence/absence of marker), 'env' (environmental variable distribution), 'popStr' (population variable on continuous scale), 'popPieChart' (belonging to a population in pie charts), 'AS' (autocorrelation of the marker). Note that the background of all maps, if found, will be the raster of the environmental variable. Thus the 'env' |
varEnvName |
char Name of the environmental variable. If a raster of the variable is located in your working directory, you can provide |
SAMethod |
char If |
SAThreshold |
char If |
saveType |
char One of NULL, 'png' or 'pdf'. If NULL is set, the maps will be shown in the R plotting window. Otherwise, it will be saved in the specified format in your working directory. |
rasterName |
char If a raster file with the environmental variable distribution exists with a different name than |
simultaneous |
boolean If TRUE and |
None
Solange Duruz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Define right GDS file according to your OS
if(Sys.info()['sysname']=='Windows'){
gdsFile=system.file("extdata", "uganda-subset-mol_windows.gds", package = "R.SamBada")
} else {
gdsFile=system.file("extdata", "uganda-subset-mol_unix.gds", package = "R.SamBada")
}
#############
# Run plotMap
#############
plotMap(envFile=system.file("extdata", "uganda-subset-env-export.csv", package = "R.SamBada"),
x='longitude', y='latitude', locationProj=4326, popStrCol='pop1', gdsFile=gdsFile,
markerName='Hapmap28985-BTA-73836_GG', mapType='marker', varEnvName='bio1',
simultaneous=FALSE)
# Maps of marker and population structure (two subplot)
plotMap(envFile=system.file("extdata", "uganda-subset-env-export.csv", package = "R.SamBada"),
'longitude','latitude', locationProj=4326, popStrCol='pop1',
gdsFile=gdsFile, markerName='Hapmap28985-BTA-73836_GG',
mapType=c('marker', 'popStr'), varEnvName='bio1', simultaneous=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.