getPolyYMeanFlag: Extract regional yearly mean of air pollutants

Description Usage Arguments Details Value Author(s) Examples

View source: R/getPolyYMeanFlag.R

Description

Extract regional monthly mean of air pollutants

Usage

1
getPolyYMeanFlag(tFlag, tpolyFl, biweekAvFl, pntlayer, ridF = "rid", siteid = "ID2")

Arguments

tFlag

project flag path

tpolyFl

polygon layer name

biweekAvFl

CSV primary file name (no extension) of biweekly mean values

pntlayer

Subject location SpatialPointsDataFrame

ridF

Regional id

siteid

AQS site id

Details

This funciton is to extract the yearly mean of air pollutants

Value

The values for yearly mean

Author(s)

Lianfa Li

Examples

1
2
3
4
5
6
7
8
9
data(sc_sample,sc_sample_loc)
sc_sample_p=sc_sample
index=match(sc_sample_p$gid,sc_sample_loc$gid)
coordinates(sc_sample_p)=coordinates(sc_sample_loc[index,])
sp::proj4string(sc_sample_p)=sp::proj4string(sc_sample_loc)

sc_sample_p$year=as.integer(format(sc_sample$s_date,"%Y"))
sc_sample$ymean_no2=getPolyYMeanFlag(tFlag="sc_sample",tpolyFl="aqs_added_sites_no2_poly",
     biweekAvFl="aqs_added_biweek_no2_yly", pntlayer=sc_sample_p,ridF="rid",siteid="ID2",yearF="year")

lspatial/sptemUS documentation built on May 29, 2019, 3:42 a.m.