Learn R Programming

sptemExp (version 0.1.4)

getTidBKMean: Batch Block Kriging for Estimate of Regional Means

Description

A batch program to implement block Kriging for estimate of regional mean for air pollutant. Support the multi-core parallel computation.

Usage

getTidBKMean(spt,rlayer,regF="NAME_3",tarF="pre_mf",n=1)

Arguments

spt

Spatial point layer (shape file) corresponding to the grid spointspre

rlayer

Regional layer to crop the points for estimate of regional means regionlayer

regF

Regiona field name regionName

tarF

the target variable to be estimated tarVar

n

Core number of CPU for parallel support ncore

Value

The spatial polygon dataframe including the field of kriged means.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# PM2.5 example.

data("spointspre","countylayer")
regionName="NAME_3"
tarF="d91" # field target name to be estimated (2014-04-01 for 91 day of 2014)
bkRes=getTidBKMean(spointspre,countylayer,regionName,tarF="d91",n=2)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab