mapStats-internal | R Documentation |
plotStats
creates trellis plot objects that are then printed by print.plotStats
. They are called
internally from within mapStats
. nobsEach
is used by jiggleClass
to
calculate the number of observations in each division. synthetic_US_dataset
generates a synthetic dataset
to be used in examples with the supplied usMap
.
plotStats(statmats, map.file, d.geo.var, map.geo.var, ngroups, separate, paletteName,
colorVec, map.label, map.label.names, cex.label, col.label, titles, cex.title,
wt.ind = FALSE, wt.label, var.pretty, geo.pretty, by.pretty,
sp_layout.pars, plotbyvar, num.col, ...)
calcQuantiles(...)
nobsEach(divs)
## S3 method for class 'plotStats'
print(x, horizontal.fill = TRUE, num.row = 1, num.col = 1, ...)
synthetic_US_dataset()
statmats |
a list object produced by |
map.file |
an object of class |
d.geo.var |
a character string of the name of the variable in the data frame |
map.geo.var |
a character string of the name of the geographic identifier in the data portion of |
ngroups |
a numeric vector of the number of levels for color plotting of variable statistics. If more than one number is specified, |
separate |
logical. Default is TRUE, meaning that class divisions will be calculated separately for each statistic's values. Setting
it to FALSE causes the function to calculate a color key by pooling the values from all the statistics across the by variables.
Generally if you plot multiple statistics on a page with the same color palette, setting |
paletteName |
a character vector containing names of color palettes for the |
colorVec |
a list where each element is vector of ordered colors; they should be ordered from light to dark for a sequential palette. These will override
the use of |
map.label |
logical. Default is TRUE; if FALSE, names of the geographic regions will not be labeled on the map outputs. |
map.label.names |
a character string naming the vector from the |
cex.label |
numeric. Character expansion for the labels to be printed. |
col.label |
color of the label text to be printed. Default is black. |
titles |
a character string of length equal to the number of statistics to be plotted, in order. Replaces the default plot titles. |
cex.title |
numeric. Character expansion for the plot titles. |
wt.ind |
logical. Default is FALSE. If TRUE, weighted statistics were calculated. If |
wt.label |
logical. Default is TRUE, in which case automatic titles will be followed by the string '(wtd.)' or '(unwtd.)' as appropriate, depending on whether weighted statistics were calculated. If FALSE no label will be added. |
var.pretty |
a character string used to name the analysis variable in the default plot titles. The default is to use |
geo.pretty |
a character string used to name the geographic class variable in the default plot titles. The default is to use |
by.pretty |
a vector of character strings used to name the by variables (other than the geographic one) in the default panel strip labels. The default is to use the original variable names in |
sp_layout.pars |
a list. This contains additional parameters to be plotted on each panel. See details section below and explanation of |
plotbyvar |
logical. If TRUE plots will be grouped by variable, otherwise by statistic. |
num.col |
numeric. To print multiple statistics on one page, indicate the number of columns for panel arrangement. Under the default, one statistic is printed per page. |
x |
list. A list produced by |
horizontal.fill |
logical. Default is TRUE, meaning that given the plot arrangement specified with |
num.row |
numeric. To print multiple statistics on one page, indicate the number of rows for panel arrangement. Under the default, one statistic is printed per page. |
divs |
An object of class |
... |
Further arguments, usually lattice plot arguments. |
plotStats |
Returns a list of plot images. Used only internally within function |
calcQuantiles |
Returns a list of |
nobsEach |
Returns a vector of frequency counts of observations in an object of class |
synthetic_US_dataset |
Returns an item of class |
Samuel Ackerman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.