Learn R Programming

sptemExp (version 0.1.4)

getPolyMMean: Generation of Regional Monthly Mean Based on the Input Polygons

Description

Generate the regional monthly mean of air pollutant concentrations based on the input polygons

Usage

getPolyMMean(polys,samp,tse,idF="siteid",ridF="rid",obsF="obs",dateF="date")

Arguments

polys

The input region polygon map object (SpatialPolygonsDataFrame) to be used the regions for generation of the regiona monthly means

samp

The sample spatial location map. Data format: SpatialPointDataFrame

tse

Time series for the siteid and date used for generation of monthly mean.

idF

location id name

ridF

region id name

obsF

observed value field name.

dateF

Date name

Value

A data frame of data format: rid, year, month, mean

Examples

Run this code
# NOT RUN {
#Use the PM2.5 concentration as an example.

data("samplepnt","prnside","shdSeries2014")
tpolys=tpolygonsByBorder(samplepnt,prnside)$tpolys
regionmmean=getPolyMMean(tpolys, samplepnt, shdSeries2014,"siteid", "rid", "obs","date")

# }

Run the code above in your browser using DataLab