Description Usage Format Source References Examples
This dataset is a subset of the ozone2 dataset in the fields package. It contains the 8-hour average ozone concentration at 147 sites in the midwest region of the U.S.
1 |
A data frame with 147 observations on the following 3 variables:
longitude
observation longitude.
latitude
observation latitude.
ozone
ozone level.
Aerometric Information Retrieval System, the U.S. Environmental Protection Agency air quality data base.
Nychka, D., Furrer, R., Paige, J. and Sain, S. (2017). fields: Tools for spatial data. R package version 9.0. https://www.r-project.org.
1 2 3 4 5 6 7 8 9 10 11 | library(HRW) ; data(ozoneSub)
if (require("mgcv"))
{
fit.ozone.mgcv.tp <- gam(ozone ~ s(longitude,latitude,bs = "tp"),
data = ozoneSub,method = "REML")
plot(fit.ozone.mgcv.tp,scheme = 2,
main = "ozone concentration",bty = "l")
points(ozoneSub$longitude,ozoneSub$latitude)
}
if (require("fields"))
US(add = TRUE,lwd = 2)
|
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
Loading required package: splines
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
Loading required package: fields
Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.5-1 (2019-12-12) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: ‘spam’
The following objects are masked from ‘package:base’:
backsolve, forwardsolve
See https://github.com/NCAR/Fields for
an extensive vignette, other supplements and source code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.