File: LakeAcid.Rd

package info (click to toggle)
r-cran-gss 2.1-3-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,740 kB
  • ctags: 1,400
  • sloc: fortran: 5,241; ansic: 1,388; makefile: 1
file content (52 lines) | stat: -rw-r--r-- 1,715 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
\name{LakeAcidity}
\alias{LakeAcidity}
\title{Water Acidity in Lakes}
\description{
    Data extracted from the Eastern Lake Survey of 1984 conducted by the
    United States Environmental Protection Agency, concerning 112 lakes
    in the Blue Ridge.
}
\usage{data(LakeAcidity)}
\format{
    A data frame containing 112 observations on the following variables.
    \tabular{ll}{
	\code{ph} \tab Surface ph.\cr
	\code{cal} \tab Calcium concentration.\cr
	\code{lat} \tab Latitude.\cr
	\code{lon} \tab Longitude.\cr
	\code{geog} \tab Geographic location, derived from \code{lat}
	and \code{lon}
    }
}
\details{
    \code{geog} was generated from \code{lat} and \code{lon} using the
    code given in the Example section.
}
\source{
    Douglas, A. and Delampady, M. (1990), \emph{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.
}
\references{
    Gu, C. and Wahba, G. (1993), Semiparametric analysis of variance
    with tensor product thin plate splines.  \emph{Journal of the Royal
	Statistical Society Ser. B}, \bold{55}, 353--368.
}
\examples{
## Converting latitude and longitude to x-y coordinates
\dontrun{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)}
}
\keyword{datasets}