Description Usage Arguments Details Value Author(s) References See Also Examples
The function angleplotmap()
is used to detect an eventual directional trend associated
to variable name.var
. It represents the absolute difference between the value of name.var
at two sites as a function of the angle between vector vector(s_is_j)
and the x-axis.
1 2 3 |
sp.obj |
object of class extending Spatial-class |
name.var |
a character; attribute name or column number in attribute table |
quantiles |
a boolean to represent the Additive Quantile Regression Smoothing |
names.attr |
a vector of character: names to use in panel (if different from the names of variable used in sp.obj) |
criteria |
a vector of boolean which permit to represent preselected sites with a cross, using the tcltk window (must be equal to the number of spatial units) |
carte |
matrix with 2 columns for drawing spatial polygonal contours : x and y coordinates of the vertices of the polygon |
identify |
if not FALSE, identify plotted objects (currently only working for points plots). Labels for identification are the row.names of the attribute table row.names(as.data.frame(sp.obj)). |
cex.lab |
character size of label |
pch |
16 by default, symbol for selected points |
col |
"lightblue3" by default, color of bars on the cloud map |
xlab |
a title for the graphic x-axis |
ylab |
a title for the graphic y-axis |
axes |
a boolean with TRUE for drawing axes on the map |
lablong |
name of the x-axis that will be printed on the map |
lablat |
name of the y-axis that will be printed on the map |
For each couple of sites (s_i,s_j), the graphic represents on the y-axis the absolute difference between var_i and var_j :
D_ij=abs(var_i-var_j)
and on the x-axis the angle theta_ij between
vector(s_is_j) and the x-axis.
Possibility to represent a smoothing spline regression quantile g_alpha. For 0<alpha<1,
Pr[D_ij<g_alpha(theta_ij)]=alpha
If that case, only the pair of sites (s_i,s_j) verifying :
D_ij>g_max(alpha)(theta_ij)
are represented.
In the case where user click on save results
button,
a matrix of integer is created as a global variable in last.select
object.
It corresponds to the numbers of spatial unit corresponding to couple of sites selected
just before leaving the Tk window.
Thomas-Agnan Christine, Aragon Yves, Ruiz-Gazen Anne, Laurent Thibault, Robidou Lauriane
Thibault Laurent, Anne Ruiz-Gazen, Christine Thomas-Agnan (2012), GeoXp: An R Package for Exploratory Spatial Data Analysis. Journal of Statistical Software, 47(2), 1-23.
Roger S.Bivand, Edzer J.Pebesma, Virgilio Gomez-Rubio (2009), Applied Spatial Data Analysis with R, Springer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ######
# data Conflicts Africa
data(afcon)
# afcon is a data.frame object. We have to create
# a Spatial object, by using first the longitude and latitude
# to create Spatial Points object ...
afcon.sp = SpatialPoints(cbind(afcon$x,afcon$y))
# ... and then by integrating other variables to create SpatialPointsDataFrame
afcon.spdf = SpatialPointsDataFrame(afcon.sp, afcon)
# For more details, see vignette('sp', package="sp")
# optional : we add some contours that don't correspond to the spatial unit
# but are nice for mapping
require("maptools")
africa <- readShapePoly(system.file("shapes/Africa.shp", package = "GeoXp")[1])
africa.contour<-spdf2list(africa)$poly
# A basic call of histomap function
angleplotmap(afcon.spdf,"totcon", carte= africa.contour,
identify=TRUE, cex.lab=0.6)
#####
# Data Meuse
data(meuse)
# meuse is a data.frame object. We have to create
# a Spatial object, by using first the longitude and latitude
# to create Spatial Points object ...
meuse.sp = SpatialPoints(cbind(meuse$x,meuse$y))
# ... and then by integrating other variables to create SpatialPointsDataFrame
meuse.spdf = SpatialPointsDataFrame(meuse.sp, meuse)
# meuse.riv is used for contour plot
data(meuse.riv)
angleplotmap(meuse.spdf,"copper",
col="green",quantiles=TRUE, cex.lab=0.7,
xlab="Concentration in plomb (in ppm)",pch=7,carte=meuse.riv[c(21:65,110:153),])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.