Description Usage Arguments Details Note Author(s) See Also Examples
Displays a simple map where the data are represented by the ‘written’ values of the data at their spatial locations.
1 2 | map.tags(xx, yy, tag, xlab = "Easting", ylab = "Northing",
taglab = deparse(substitute(tag)), main = "", tol = 0.04, ...)
|
xx |
name of the x-axis spatial coordinate, the eastings. |
yy |
name of the y-axis spatial coordinate, the northings. |
tag |
name of the variable to be plotted as a map. |
xlab |
a title for the x-axis, defaults to |
ylab |
a title for the y-axis, defaults to |
taglab |
by default, |
main |
an alternative map title, see Details below. |
tol |
a parameter used to ensure the area included within the neatline around the map is larger than the distribution of the points so that the plotted symbols fall within the neatline. By default |
... |
further arguments to be passed to methods. For example, if smaller plotting characters are required, specify |
If taglab
and main
are undefined a default a map title is generated by appending the input variable name text string to "Map of Values for "
. If no map title is required set taglab = ""
, or if an alternative to the variable name taglab
is required it may be specified, taglab = "Alternative"
. If some user defined map title is required it should be defined in main
, e.g. main = "Map Title Text"
, in which instance taglab
is ignored.
If a map of sample numbers, ‘IDs’, is required and they are not explicitly in the data frame, a map of data frame row numbers may be displayed by specifying dimnames(dfname)[[1]]
as the value of tags
.
Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data, must be removed prior to executing this function, see ltdl.fix.df
.
Any data vectors including NA
s for spatial coordinates are removed prior to displaying the map, thus those ‘sites’ are not plotted. However, where coordinates are present any NA
s in the variable to be plotted are replaced with a ‘+’ sign to indicate sites with ‘missing data’.
In some R installations the generation of multi-panel displays and the use of function eqscplot from package MASS causes warning messages related to graphics parameters to be displayed on the current device. These may be suppressed by entering options(warn = -1)
on the R command line, or that line may be included in a ‘first’ function prepared by the user that loads the ‘rgr’ package, etc.
Robert G. Garrett
ltdl.fix.df
, remove.na
, display.lty
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 | ## Make test data available
data(sind)
attach(sind)
## Plot a sample site number map
map.tags(E, N, ID)
## Plot a sample site number map with smaller numbers
## and a wider internal map margin
map.tags(E, N, ID, cex = 0.8, tol = 0.06)
## Plot the data frame row numbers rather than the sample
## numbers
map.tags(E, N, dimnames(sind)[[1]], cex = 0.8, tol = 0.06)
## Plot the values for Zn in red, providing enough internal
## map margin so the values do not overprint the map neat-line
map.tags(E, N, Zn, cex = 0.8, tol = 0.1, col = 2)
## Plot as above but with an informative title spread over
## two lines and with a slightly smaller font
map.tags(E, N, Zn, cex = 0.8, tol = 0.1, col = 2, main =
"Howarth & Sinding-Larsen\nStream Sediment Zn Data",
cex.main = 0.9)
## Detach test data
detach(sind)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.