# NOT RUN {
data(HRprec08)
library(sp)
# }
# NOT RUN {
# subset:
prec.2008.05.01 <- HRprec08[HRprec08$DATE=="2008-05-01",]
coordinates(prec.2008.05.01) <- ~Lon+Lat
proj4string(prec.2008.05.01) <- CRS("+proj=lonlat +datum=WGS84")
# write to KML:
shape = "http://plotkml.r-forge.r-project.org/circle.png"
data(SAGA_pal)
kml(prec.2008.05.01, size = PREC, shape = shape, colour = PREC,
colour_scale = SAGA_pal[[9]], labels = PREC)
# }
Run the code above in your browser using DataLab