| environmental {lattice} | R Documentation |
Daily measurements of ozone concentration, wind speed, temperature and solar radiation in New York City from May to September of 1973.
environmental
A data frame with 111 observations on the following 4 variables.
Documentation contributed by Kevin Wright.
Bruntz, S. M., W. S. Cleveland, B. Kleiner, and J. L. Warner. (1974). The Dependence of Ambient Ozone on Solar Radiation, Wind, Temperature, and Mixing Height. In Symposium on Atmospheric Diffusion and Air Pollution, pages 125–128. American Meterological Society, Boston.
Cleveland, William S. (1993). Visualizing Data. Hobart Press, Summit, New Jersey.
environmental
datasets
# Scatter plot matrix with loess lines
splom(~environmental,
panel=function(x,y){
panel.xyplot(x,y)
panel.loess(x,y)
}
)
# Conditioned plot similar to figure 5.3 from Cleveland
attach(environmental)
Temperature <- equal.count(temperature, 4, 1/2)
Wind <- equal.count(wind, 4, 1/2)
xyplot((ozone^(1/3)) ~ radiation | Temperature * Wind,
aspect=1,
prepanel = function(x, y)
prepanel.loess(x, y, span = 1),
panel = function(x, y){
panel.grid(h = 2, v = 2)
panel.xyplot(x, y, cex = .5)
panel.loess(x, y, span = 1)
},
xlab = "Solar radiation (langleys)",
ylab = "Ozone (cube root ppb)")
detach()
# Similar display using the coplot function
with(environmental,{
coplot((ozone^.33) ~ radiation | temperature * wind,
number=c(4,4),
panel = function(x, y, ...) panel.smooth(x, y, span = .8, ...),
xlab="Solar radiation (langleys)",
ylab="Ozone (cube root ppb)")
})
R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(lattice)
> png(filename="images/environmental_%03d.png" ,width=480, height=480)
> ### Name: environmental
> ### Title: Atmospheric environmental conditions in New York City
> ### Aliases: environmental
> ### Keywords: datasets
>
> ### ** Examples
>
> # Scatter plot matrix with loess lines
> splom(~environmental,
+ panel=function(x,y){
+ panel.xyplot(x,y)
+ panel.loess(x,y)
+ }
+ )
>
> # Conditioned plot similar to figure 5.3 from Cleveland
> attach(environmental)
> Temperature <- equal.count(temperature, 4, 1/2)
> Wind <- equal.count(wind, 4, 1/2)
> xyplot((ozone^(1/3)) ~ radiation | Temperature * Wind,
+ aspect=1,
+ prepanel = function(x, y)
+ prepanel.loess(x, y, span = 1),
+ panel = function(x, y){
+ panel.grid(h = 2, v = 2)
+ panel.xyplot(x, y, cex = .5)
+ panel.loess(x, y, span = 1)
+ },
+ xlab = "Solar radiation (langleys)",
+ ylab = "Ozone (cube root ppb)")
> detach()
>
> # Similar display using the coplot function
> with(environmental,{
+ coplot((ozone^.33) ~ radiation | temperature * wind,
+ number=c(4,4),
+ panel = function(x, y, ...) panel.smooth(x, y, span = .8, ...),
+ xlab="Solar radiation (langleys)",
+ ylab="Ozone (cube root ppb)")
+ })
>
>
>
> dev.off()
null device
1
>