R/mypolygon.R

`mypolygon` <-structure(function#simple wrapper function to plot colored polygons
###same as \link{polygon}, execept the value for color is taken from the 1st element of the exra column 'col'
(
  x, ##<< matrix containing columns X,Y,col
  ...##<< extra arguments passed to  \link{polygon}
){
  polygon(x[,c("X","Y")],col=x[1,"col"],...)  
})

Try the RgoogleMaps package in your browser

Any scripts or data that you put into this service are public.

RgoogleMaps documentation built on Aug. 21, 2025, 5:26 p.m.