Description Usage Arguments Note Author(s) See Also Examples
For each period (row) or for the overall period of the
observed matrix of the "sts" object, a map
showing the counts by region is produced.
It is possible to redirect the output into files, e.g. to generate an
animated GIF.
| 1 2 3 | 
| x | an object of class  | 
| type | a formula (see  | 
| legend | An object of type  
 If  | 
| opts.col | A list containing the two elements 
 | 
| labels | 
 | 
| wait.ms | Number of milliseconds to wait between each plot | 
| cex.lab | 
 | 
| verbose | 
 | 
| dev.printer | Either  | 
| ... | Extra arguments sent to the plot function. | 
The animate.sts method provides a
re-implementation and supersedes this function!
Michael Höhle
Other stsplot types, and animate.sts for
the new implementation.
| 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 | data("ha.sts")
print(ha.sts)
## map of total counts by district
plot(ha.sts, type=observed ~ 1 | unit)
## only show a sub-period total for two selected districts
plot(ha.sts[1:20,1:2], type=observed ~ 1 | unit)
## Not run: 
# space-time animation
plot(aggregate(ha.sts,nfreq=13), type= observed ~ 1 | unit * time)
#Configure a png device printer to save the frames
dev.printer <- list(device=png, extension=".png", width=640, height=480,
                    name=file.path(tempdir(),"berlin"))
#Do the animation (without extra sleeping time between frames)
plot(aggregate(ha.sts,nfreq=13), type = observed ~ 1 | unit * time,
     wait.ms=0, dev.printer=dev.printer)
#Use ImageMagick (you might have to adjust the path to 'convert')
system(paste("convert -delay 50 ",dev.printer$name,
           "*.png ", dev.printer$name, "-animated.gif",sep=""))
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.