stplot | R Documentation |
given a matrix where each line is a time series of each spatial unit, the time series are shown over the map
stplot(
x,
sp,
d,
col,
ce,
tsub = NULL,
ex = 1,
ey = 1,
add = FALSE,
legend = TRUE,
leg.args = list(x = "bottomleft", lty = 1),
verbose = FALSE,
...
)
x |
a matrix with each column containing data at each time for a set of geographical units |
sp |
an object as defined in the 'sp' package |
d |
a vector to specify a |
col |
a vector of colors for each time series. If not provided, the collors will be defined considering the relative growth of each time series and series with similar growth will have similar colors. By default red color is for the series with most positive growth and blue for those with least growth. |
ce |
vector of coordinates to center the time
the time series. If not provided, the |
tsub |
if NULL, default, the colors consider the average of the time series. If integer, specifies the number of temporal subdivisions to evaluate the growth of each time series, used to define the colors. |
ex |
is a relative expansion factor for the x-axis extent |
ey |
is a relative expansion factor for the y-axis extent |
add |
logical indicating if the plot is to be added to a current plot |
legend |
logical indicatint if the legend is bo be drawn |
leg.args |
legend arguments, used if legend=TRUE |
verbose |
logical to specify if some steps are being reported during the process work |
... |
additional arguments passed to
|
## Not run:
## Consider data from the surveillance package
data(measlesWeserEms, package='surveillance')
if (any(ls()=='measlesWeserEms'))
stplot(t(measlesWeserEms@observed),
measlesWeserEms@map)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.