Description Usage Arguments Details Value Author(s) Examples
View source: R/getPolyYMeanFlag.R
Extract regional monthly mean of air pollutants
1 | getPolyYMeanFlag(tFlag, tpolyFl, biweekAvFl, pntlayer, ridF = "rid", siteid = "ID2")
|
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 |
This funciton is to extract the yearly mean of air pollutants
The values for yearly mean
Lianfa Li
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.