cleveland.soil: Soil resistivity in a field

Description Format Details Source Examples

Description

Soil resistivity in a field

Format

A data frame with 8641 observations on the following 5 variables.

northing

y ordinate

easting

x ordinate

resistivity

Soil resistivity, ohms

is.ns

Indicator of north/south track

track

Track number

Details

Resistivity is related to soil salinity.

Source

William Cleveland, (1993), Visualizing Data. Electronic version from StatLib: http://lib.stat.cmu.edu/datasets/

Cleaned version from Luke Tierney http://homepage.stat.uiowa.edu/~luke/classes/248/examples/soil

Examples

 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
data(cleveland.soil)
dat <- cleveland.soil

# Similar to Cleveland fig 4.64
## require(latticeExtra)
## redblue <- colorRampPalette(c("firebrick", "lightgray", "#375997"))
## levelplot(resistivity ~ easting + northing, data = dat,
##           col.regions=redblue,
##           panel=panel.levelplot.points,
##           aspect=2.4, xlab= "Easting (km)", ylab= "Northing (km)",
##           main="cleveland")

# 2D loess plot. Cleveland fig 4.68
sg1 <- expand.grid(easting = seq(.15, 1.410, by = .02),
                   northing = seq(.150, 3.645, by = .02))
lo1 <- loess(resistivity~easting*northing, data=dat, span = 0.1, degree = 2)
fit1 <- predict(lo1, sg1)
require(lattice)
redblue <- colorRampPalette(c("firebrick", "lightgray", "#375997"))
levelplot(fit1 ~ sg1$easting * sg1$northing,
          col.regions=redblue,
          cuts = 9,
          aspect=2.4, xlab = "Easting (km)", ylab = "Northing (km)",
          main="cleveland.soil - 2D smooth of Resistivity")

# ----------------------------------------------------------------------------

## Not run: 
  # 3D loess plot with data overlaid
  require(rgl)
  bg3d(color = "white")
  clear3d()
  points3d(dat$easting, dat$northing, dat$resistivity / 100,
           col = rep("gray50", nrow(dat)))
  rgl::surface3d(seq(.15, 1.410, by = .02),
                 seq(.150, 3.645, by = .02),
                 fit1/100, alpha=0.9, col=rep("wheat", length(fit1)),
                 front="fill", back="fill")
  rgl.close()

## End(Not run)

agridat documentation built on May 2, 2019, 4:01 p.m.