LakeAcidity {gss} | R Documentation |
Data extracted from the Eastern Lake Survey of 1984 conducted by the United States Environmental Protection Agency, concerning 112 lakes in the Blue Ridge.
data(LakeAcidity)
A data frame containing 112 observations on the following variables.
ph | Surface ph. |
cal | Calcium concentration. |
lat | Latitude. |
lon | Longitude. |
geog | Geographic location, derived from lat
and lon
|
geog
was generated from lat
and lon
using the
code given in the Example section.
Douglas, A. and Delampady, M. (1990), Eastern Lake Survey – Phase I: Documentation for the Data Base and the Derived Data sets. Tech Report 160 (SIMS), Dept. Statistics, University of British Columbia.
Gu, C. and Wahba, G. (1993), Semiparametric analysis of variance with tensor product thin plate splines. Journal of the Royal Statistical Society Ser. B, 55, 353–368.
## Converting latitude and longitude to x-y coordinates ## Not run: ltln2xy <- function(latlon,latlon0) { lat <- latlon[,1]*pi/180; lon <- latlon[,2]*pi/180 lt0 <- latlon0[1]*pi/180; ln0 <- latlon0[2]*pi/180 x <- cos(lt0)*sin(lon-ln0); y <- sin(lat-lt0) cbind(x,y) } data(LakeAcidity) latlon <- as.matrix(LakeAcidity[,c("lat","lon")]) m.lat <- (min(latlon[,1])+max(latlon[,1]))/2 m.lon <- (min(latlon[,2])+max(latlon[,2]))/2 ltln2xy(latlon,c(m.lat,m.lon)) ## Clean up rm(ltln2xy,LakeAcidity,latlon,m.lat,m.lon) ## End(Not run)