9  Data Sets

Chapter 9 demonstrates several, though not all, data objects from package datasets shipped with R version 4.5.2 (2025-10-31) and package spatstat.data (v3.1.9).

The function calls in Chapter 9 are exclusively those provided in package base and stats shipped with R version 4.5.2 (2025-10-31), and in the spatstat.* family of packages.

search path & loadedNamespaces on author’s computer
search()
# [1] ".GlobalEnv"        "package:stats"     "package:graphics"  "package:grDevices" "package:utils"     "package:datasets"  "package:methods"   "Autoloads"         "package:base"
loadedNamespaces() |> sort.int()
#  [1] "base"        "cli"         "compiler"    "datasets"    "digest"      "evaluate"    "fastmap"     "graphics"    "grDevices"   "htmltools"   "htmlwidgets" "jsonlite"    "knitr"       "methods"    
# [15] "otel"        "rlang"       "rmarkdown"   "rstudioapi"  "stats"       "tools"       "utils"       "xfun"        "yaml"

9.1 anemones

The point-pattern (ppp.object, Chapter 35) anemones from package spatstat.data (v3.1.9) has (Listing 9.2, Figure 9.1)

Listing 9.1: Figure: anemones
Code
par(mar = c(0,0,0,0))
spatstat.data::anemones |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.1: anemones
Listing 9.2: Data: anemones
spatstat.data::anemones |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 231 points
# marks are numeric, of storage type  'integer'
# window: rectangle = [0, 280] x [0, 180] units
Listing 9.3: Review: number of points in anemones
spatstat.data::anemones |>
  spatstat.geom::npoints.ppp()
# [1] 231
Listing 9.4: Review: window of anemones
spatstat.data::anemones |>
  spatstat.geom::Window.ppp()
# window: rectangle = [0, 280] x [0, 180] units
Listing 9.5: Review: storage mode of the marks of anemones
spatstat.data::anemones |>
  spatstat.geom::marks.ppp() |>
  typeof()
# [1] "integer"
Listing 9.6: Review: mark-format of anemones
spatstat.data::anemones |>
  spatstat.geom::markformat.ppp()
# [1] "vector"

9.2 ants

The point-pattern (ppp.object, Chapter 35) ants from package spatstat.data (v3.1.9) has (Listing 9.8, Figure 9.2)

  • 97 points;
  • polygonal window;
  • one multi-type mark with two levels, 'Cataglyphis' and 'Messor' (Listing 9.9);
  • 'vector' mark-format.
Listing 9.7: Figure: ants
Code
par(mar = c(0,0,0,0))
spatstat.data::ants |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.2: ants
Listing 9.8: Data: ants
spatstat.data::ants |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 97 points
# Multitype, with levels = Cataglyphis, Messor 
# window: polygonal boundary
# enclosing rectangle: [-25, 803] x [-49, 717] units (one unit = 0.5 feet)
Listing 9.9: Review: marks of ants
spatstat.data::ants |>
  spatstat.geom::marks.ppp() |>
  table()
# 
# Cataglyphis      Messor 
#          29          68

9.3 austates

The tessellation (Chapter 41) austates from package spatstat.data (v3.1.9) has (Listing 9.11, Figure 9.3)

Listing 9.10: Figure: austates
Code
par(mar = c(0,0,1,0))
spatstat.data::austates |>
  spatstat.geom::plot.tess(main = '')
Figure 9.3: austates
Listing 9.11: Data: austates
spatstat.data::austates |>
  spatstat.geom::print.tess()
# Tessellation
# Tiles are irregular polygons
# 7 tiles (irregular windows)
# window: polygonal boundary
# enclosing rectangle: [113.19392, 153.6692] x [-43.59316, -10.93156] degrees
Listing 9.12: Review: tiles in austates
spatstat.data::austates |>
  spatstat.geom::tiles()
# List of spatial objects
# 
# WA:
# window: polygonal boundary
# enclosing rectangle: [113.19392, 129.01141] x [-35.11407, -13.76426] degrees
# 
# NT:
# window: polygonal boundary
# enclosing rectangle: [129.01141, 138.0038] x [-25.988593, -11.045627] degrees
# 
# ✂️ --- output truncated --- ✂️

9.4 betacells

The point-pattern (ppp.object, Chapter 35) betacells from package spatstat.data (v3.1.9) has (Listing 9.14, Figure 9.4)

Listing 9.13: Figure: betacells
Code
par(mar = c(0,0,0,0))
spatstat.data::betacells |>
  spatstat.geom::plot.ppp(main = '')
Figure 9.4: betacells
Listing 9.14: Data: betacells
spatstat.data::betacells |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 135 points
# Mark variables: type, area 
# window: rectangle = [28.08, 778.08] x [16.2, 1007.02] microns
Listing 9.15: Review: mark-format of betacells
spatstat.data::betacells |>
  spatstat.geom::markformat.ppp()
# [1] "dataframe"
Listing 9.16: Review: marks of betacells
spatstat.data::betacells |>
  spatstat.geom::marks.ppp()
#     type  area
# 1     on 275.9
# 2    off 241.2
# 3     on 256.0
# ✂️ --- output truncated --- ✂️

9.5 bronzefilter

The point-pattern (ppp.object, Chapter 35) bronzefilter from package spatstat.data (v3.1.9) has (Listing 9.18, Figure 9.5)

  • 678 points;
  • rectangle window;
  • one numeric mark.
Listing 9.17: Figure: bronzefilter
Code
par(mar = c(0,1,0,0))
spatstat.data::bronzefilter |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.5: bronzefilter
Listing 9.18: Data: bronzefilter
spatstat.data::bronzefilter |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 678 points
# marks are numeric, of storage type  'double'
# window: rectangle = [0, 18] x [0, 7] mm

9.6 btb.extra

The point-pattern-list (ppplist, Chapter 36) btb.extra from package spatstat.data (v3.1.9) (Listing 9.20, Figure 9.6)

Listing 9.19: Figure: btb.extra
Code
par(mar = c(0,1,1,1))
spatstat.data::btb.extra |> 
  spatstat.geom::plot.solist() |>
  suppressWarnings() |> suppressMessages()
Figure 9.6: btb.extra
Listing 9.20: Data: btb.extra
spatstat.data::btb.extra
# List of point patterns
# 
# full:
# Marked planar point pattern: 919 points
# Mark variables: year, spoligotype 
# window: polygonal boundary
# enclosing rectangle: [133.5147, 246.0193] x [10.88514, 118.7298] km
# 
# standard:
# Marked planar point pattern: 873 points
# Mark variables: year, spoligotype 
# window: polygonal boundary
# enclosing rectangle: [133.5147, 246.0193] x [10.88514, 118.7298] km
Listing 9.21: Review: inheritance of btb.extra
spatstat.data::btb.extra |> 
  class()
# [1] "ppplist" "solist"  "anylist" "listof"  "list"
Listing 9.22: Review: class of members of btb.extra
spatstat.data::btb.extra |> 
  sapply(FUN = class)
#     full standard 
#    "ppp"    "ppp"

9.7 cars

The data frame (data.frame, Chapter 17) cars from package datasets shipped with R version 4.5.2 (2025-10-31) has (Listing 9.23)

  • 50 rows and 2 columns (Listing 9.24)
  • two numeric columns: $speed and $dist.
Listing 9.23: Data: cars
datasets::cars |>
  print.data.frame()
#    speed dist
# 1      4    2
# 2      4   10
# 3      7    4
# 4      7   22
# ✂️ --- output truncated --- ✂️
Listing 9.24: Review: dimensions of cars
datasets::cars |>
  dim.data.frame()
# [1] 50  2

9.8 cetaceans

The hyper data frame (hyperframe, Chapter 25) cetaceans from package spatstat.data (v3.1.9) has (Listing 9.25)

  • 9 rows and 4 (hyper)columns (Listing 9.26)
  • four point-pattern (ppp, Chapter 35) hypercolumns: $whales, $dolphins, $fish and $plankton.
Listing 9.25: Data: cetaceans
spatstat.data::cetaceans |>
  spatstat.geom::print.hyperframe()
# Hyperframe:
#   whales dolphins  fish plankton
# 1  (ppp)    (ppp) (ppp)    (ppp)
# 2  (ppp)    (ppp) (ppp)    (ppp)
# 3  (ppp)    (ppp) (ppp)    (ppp)
# ✂️ --- output truncated --- ✂️
Listing 9.26: Review: dimensions of cetaceans
spatstat.data::cetaceans |>
  spatstat.geom::dim.hyperframe()
# [1] 9 4

9.9 demohyper

The hyper data frame (hyperframe, Chapter 25) demohyper from package spatstat.data (v3.1.9) has (Listing 9.27)

  • 3 rows and 3 (hyper)columns (Listing 9.28)
  • a point-pattern (ppp, Chapter 35) hypercolumn $Points
  • a pixel-image (im, Chapter 27) hypercolumn $Image
  • a regular column $Group.
Listing 9.27: Data: demohyper
spatstat.data::demohyper |>
  spatstat.geom::print.hyperframe()
# Hyperframe:
#   Points Image Group
# 1  (ppp)  (im)     a
# 2  (ppp)  (im)     b
# 3  (ppp)  (im)     a
Listing 9.28: Review: dimensions of demohyper
spatstat.data::demohyper |>
  spatstat.geom::dim.hyperframe()
# [1] 3 3

To view the hyper data frame demohyper in a desired format, readers may call the S3 method spatstat.geom::print.hyperframe() explicitly (Listing 9.27). Alternatively, readers may call the S3 generic function print() by simply typing demohyper at the R console prompt and pressing Enter, after putting the package spatstat.geom (v3.7.0.6)

The rest of Section 9.9 showcases the *.hyperframe() methods of the .Primitive S3 generic functions names() (Listing 9.29) and `$` (Listing 9.30, Listing 9.31).

Listing 9.29 finds the (hyper)column names of the hyper data frame demohyper,

Listing 9.29: Review: (hyper)column names of demohyper
spatstat.data::demohyper |>
  spatstat.geom::names.hyperframe()
# [1] "Points" "Image"  "Group"

Listing 9.30 and Listing 9.31 observe the ppp-hypercolumn $Points,

Listing 9.30: Review: ppp-hypercolumn $Points
spatstat.data::demohyper$Points |>
  class()
# [1] "ppplist" "solist"  "anylist" "listof"  "list"
Listing 9.31: Advanced: ppp-hypercolumn $Points, nerdy!
spatstat.data::demohyper |>
  spatstat.geom::`$.hyperframe`(name = 'Points') |> # nerdy!!
  identical(y = spatstat.data::demohyper$Points) |>
  stopifnot()

Listing 9.32 and Listing 9.33 find the first point-pattern element of the ppp-hypercolumn $Points,

Listing 9.32: Review: 1st point-pattern in ppp-hypercolumn $Points
demohyper_p1 = spatstat.data::demohyper$Points[[1L]] 
demohyper_p1 |>
  spatstat.geom::print.ppp()
# Planar point pattern: 104 points
# window: binary image mask
# 128 x 128 pixel array (ny, nx)
# enclosing rectangle: [2.017, 3.93] x [0.645, 3.278] units
Listing 9.33: Advanced: 1st point-pattern in ppp-hypercolumn $Points, nerdy!
spatstat.data::demohyper$Points |>
  base::`[[`(i = 1L) |> # nerdy!!
  identical(y = demohyper_p1) |>
  stopifnot()

Listing 9.34 finds the first pixel-image element of the im-hypercolumn $Image,

Listing 9.34: Review: 1st pixel-image in im-hypercolumn $Image
spatstat.data::demohyper$Image[[1L]] |>
  spatstat.geom::print.im()
# real-valued pixel image
# 53 x 39 pixel array (ny, nx)
# enclosing rectangle: [2.017, 3.93] x [0.645, 3.278] units

9.10 faithful

The data frame (data.frame, Chapter 17) faithful from package datasets shipped with R version 4.5.2 (2025-10-31) has (Listing 9.35)

  • 272 rows and 2 columns (Listing 9.36)
  • two numeric columns: $eruptions and $waiting.
Listing 9.35: Data: faithful
datasets::faithful |>
  print.data.frame()
#     eruptions waiting
# 1       3.600      79
# 2       1.800      54
# 3       3.333      74
# 4       2.283      62
# ✂️ --- output truncated --- ✂️
Listing 9.36: Review: dimensions of faithful
datasets::faithful |>
  dim.data.frame()
# [1] 272   2

9.11 finpines

The point-pattern (ppp.object, Chapter 35) finpines from package spatstat.data (v3.1.9) has (Listing 9.38, Figure 9.7)

  • 126 points;
  • rectangle window;
  • two numeric marks, diameter and height.
Listing 9.37: Figure: finpines
Code
par(mar = c(0,0,0,0))
spatstat.data::finpines |>
  spatstat.geom::plot.ppp(main = '')
Figure 9.7: finpines
Listing 9.38: Data: finpines
spatstat.data::finpines |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 126 points
# Mark variables: diameter, height 
# window: rectangle = [-5, 5] x [-8, 2] metres

9.12 flu

The hyper data frame (hyperframe, Chapter 25) flu from package spatstat.data (v3.1.9) has (Listing 9.39)

  • 41 rows and 4 (hyper)columns (Listing 9.40)
  • a point-pattern (ppp, Chapter 35) hypercolumn $pattern
  • regular columns $virustype, $stain, $frameid
Listing 9.39: Data: flu
spatstat.data::flu |>
  spatstat.geom::print.hyperframe()
# Hyperframe:
#                pattern virustype stain frameid
# wt M2-M1 13      (ppp)        wt M2-M1      13
# wt M2-M1 22      (ppp)        wt M2-M1      22
# wt M2-M1 27      (ppp)        wt M2-M1      27
# ✂️ --- output truncated --- ✂️
Listing 9.40: Review: dimensions of flu
spatstat.data::flu |>
  spatstat.geom::dim.hyperframe()
# [1] 41  4

9.13 gorillas

The point-pattern (ppp.object, Chapter 35) gorillas from package spatstat.data (v3.1.9) has (Listing 9.42, Figure 9.8)

  • 647 points;
  • polygonal window;
  • two multi-type marks, group (with two levels 'major' and 'minor') and season (with two levels 'dry' and 'rainy').
Listing 9.41: Figure: gorillas
Code
par(mar = c(0,0,1,0))
spatstat.data::gorillas |>
  spatstat.geom::plot.ppp(which.marks = c('group', 'season'))
Figure 9.8: gorillas
Listing 9.42: Data: gorillas
spatstat.data::gorillas |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 647 points
# Mark variables: group, season, date 
# window: polygonal boundary
# enclosing rectangle: [580457.9, 585934] x [674172.8, 678739.2] metres

9.14 gorillas.extra

The pixel-image list (imlist, Chapter 28) gorillas.extra from package spatstat.data (v3.1.9) (Listing 9.44, Figure 9.9)

Listing 9.43: Figure: gorillas.extra
Code
par(mar = c(0,0,0,0))
spatstat.data::gorillas.extra |> 
  plot(main = '') |>
  suppressWarnings() |> suppressMessages()
Figure 9.9: gorillas.extra
Listing 9.44: Data: gorillas.extra
spatstat.data::gorillas.extra
# List of pixel images
# 
# aspect:
# factor-valued pixel image
# factor levels:
# [1] "N"  "NE" "E"  "SE" "S"  "SW" "W"  "NW"
# 149 x 181 pixel array (ny, nx)
# enclosing rectangle: [580440, 586000] x [674160, 678730] metres
# 
# elevation:
# integer-valued pixel image
# 149 x 181 pixel array (ny, nx)
# enclosing rectangle: [580440, 586000] x [674160, 678730] metres
# 
# ✂️ --- output truncated --- ✂️
Listing 9.45: Review: inheritance of gorillas.extra
spatstat.data::gorillas.extra |> 
  class()
# [1] "imlist"  "solist"  "anylist" "listof"  "list"
Listing 9.46: Review: class of members of gorillas.extra
spatstat.data::gorillas.extra |> 
  sapply(FUN = class)
#     aspect  elevation       heat slopeangle  slopetype vegetation  waterdist 
#       "im"       "im"       "im"       "im"       "im"       "im"       "im"

9.15 hyytiala

The point-pattern (ppp.object, Chapter 35) hyytiala from package spatstat.data (v3.1.9) has (Listing 9.48, Figure 9.10)

  • 168 points;
  • rectangle window;
  • one multi-type mark with four levels, 'aspen', 'birch', 'pine' and 'rowan' (Listing 9.49);
  • 'vector' mark-format.
Listing 9.47: Figure: hyytiala
Code
par(mar = c(0,0,0,0))
spatstat.data::hyytiala |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.10: hyytiala
Listing 9.48: Data: hyytiala
spatstat.data::hyytiala |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 168 points
# Multitype, with levels = aspen, birch, pine, rowan 
# window: rectangle = [0, 20] x [0, 20] metres
Listing 9.49: Review: marks of hyytiala
spatstat.data::hyytiala |>
  spatstat.geom::marks.ppp() |>
  table()
# 
# aspen birch  pine rowan 
#     1    17   128    22

9.16 Kovesi

The hyper data frame (hyperframe, Chapter 25) Kovesi from package spatstat.data (v3.1.9) has (Listing 9.50)

Listing 9.50: Data: Kovesi
spatstat.data::Kovesi |>
  spatstat.geom::print.hyperframe()
# Hyperframe:
#    linear diverging rainbow cyclic isoluminant ternary colsig l1  l2 chro   n cycsh      values
# 1   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE      j 15  85    0 256     0 (character)
# 2   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE      j 15  85    0 256    25 (character)
# 3   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE  mrybm 35  75   68 256     0 (character)
# 4   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE  mrybm 35  75   68 256    25 (character)
# 5   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE  mygbm 30  95   78 256     0 (character)
# ✂️ --- output truncated --- ✂️
Listing 9.51: Review: dimensions of Kovesi
spatstat.data::Kovesi |>
  spatstat.geom::dim.hyperframe()
# [1] 41 13
Listing 9.52: Review: class of hypercolumn $values
spatstat.data::Kovesi$values |>
  class()
# [1] "anylist" "listof"  "list"
Listing 9.53: Review: length of hypercolumn $values
spatstat.data::Kovesi$values |>
  length()
# [1] 41
Listing 9.54: Review: lengths of hypercolumn $values
spatstat.data::Kovesi$values |>
  lengths() |>
  unique.default()
# [1] 256

9.17 longleaf

The point-pattern (ppp.object, Chapter 35) longleaf from package spatstat.data (v3.1.9) has (Listing 9.56, Figure 9.11)

  • 584 points;
  • rectangle window;
  • one numeric mark.
Listing 9.55: Figure: longleaf
Code
par(mar = c(0,0,0,0))
spatstat.data::longleaf |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.11: longleaf
Listing 9.56: Data: longleaf
spatstat.data::longleaf |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 584 points
# marks are numeric, of storage type  'double'
# window: rectangle = [0, 200] x [0, 200] metres

9.18 meningitis

The spatial-object list (solist, Chapter 38) meningitis from package spatstat.data (v3.1.9) contains (Listing 9.58, Figure 9.12)

Listing 9.57: Figure: meningitis
Code
par(mar = c(0,0,0,0))
spatstat.data::meningitis |>
  spatstat.geom::plot.solist(main = '')
Figure 9.12: meningitis
Listing 9.58: Data: meningitis
spatstat.data::meningitis
# List of spatial objects
# 
# cases:
# Marked planar point pattern: 636 points
# Multitype, with levels = B, C 
# window: polygonal boundary
# enclosing rectangle: [4031.295, 4672.253] x [2684.102, 3549.931] km
# 
# kreise:
# Tessellation
# Tiles are irregular polygons
# 413 tiles (irregular windows)
# Tessellation has a data frame of marks:
#   $marks:     double
# window: polygonal boundary
# enclosing rectangle: [4031.295, 4672.253] x [2684.102, 3549.931] km

9.19 nbfires

The point-pattern (ppp.object, Chapter 35) nbfires from package spatstat.data (v3.1.9) has (Listing 9.60, Figure 9.13)

  • 7108 points;
  • polygonal window;
  • multi-type marks, e.g., $fire.type, $cause and $ign.src;
  • numeric marks, e.g., $fnl.size.
Listing 9.59: Figure: nbfires
Code
par(mar = c(0,0,1,0))
spatstat.data::nbfires |>
  spatstat.geom::plot.ppp(which.marks = c('fire.type', 'cause', 'ign.src', 'fnl.size'))
# Warning: Only 10 out of 16 symbols are shown in the symbol map
Figure 9.13: nbfires
Listing 9.60: Data: nbfires
spatstat.data::nbfires |>
  spatstat.geom::print.ppp()
# Warning: some mark values are NA in the point pattern x
# Marked planar point pattern: 7108 points
# Mark variables: year, fire.type, dis.date, dis.julian, out.date, out.julian, cause, ign.src, fnl.size 
# window: polygonal boundary
# enclosing rectangle: [0, 1000] x [0, 958.9142] units (one unit = 0.403716 km)

9.20 osteo

The hyper data frame (hyperframe, Chapter 25) osteo from package spatstat.data (v3.1.9) has (Listing 9.61)

  • 40 rows and 5 (hyper)columns (Listing 9.62)
  • the serial number of sampling volume $brick nested in the bone sample $id
  • a three-dimensional point-pattern (pp3, Chapter 34) hypercolumn $pts
Listing 9.61: Data: osteo
spatstat.data::osteo |> 
  spatstat.geom::print.hyperframe()
# Hyperframe:
#         id shortid brick   pts depth
# 1   c77za4       4     1 (pp3)    45
# 2   c77za4       4     2 (pp3)    60
# 3   c77za4       4     3 (pp3)    55
# 4   c77za4       4     4 (pp3)    60
# 5   c77za4       4     5 (pp3)    85
# ✂️ --- output truncated --- ✂️
Listing 9.62: Review: dimensions of osteo
spatstat.data::osteo |>
  spatstat.geom::dim.hyperframe()
# [1] 40  5

9.21 spruces

The point-pattern (ppp.object, Chapter 35) spruces from package spatstat.data (v3.1.9) has (Listing 9.64, Figure 9.14)

  • 134 points;
  • rectangle window;
  • one numeric mark.
Listing 9.63: Figure: spruces
Code
par(mar = c(0,0,0,0))
spatstat.data::spruces |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.14: spruces
Listing 9.64: Data: spruces
spatstat.data::spruces |>
  spatstat.geom::print.ppp()
# Marked planar point pattern: 134 points
# marks are numeric, of storage type  'double'
# window: rectangle = [0, 56] x [0, 38] metres

9.22 swedishpines

The point-pattern (ppp.object, Chapter 35) swedishpines from package spatstat.data (v3.1.9) has (Listing 9.66, Figure 9.15)

  • the \(x\)- and \(y\)-coordinates of 71 points;
  • rectangle window;
  • no marks, i.e., 'none' mark-format.
Listing 9.65: Figure: swedishpines
Code
par(mar = c(0,0,0,0))
spatstat.data::swedishpines |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.15: swedishpines
Listing 9.66: Data: swedishpines
spatstat.data::swedishpines |>
  spatstat.geom::print.ppp()
# Planar point pattern: 71 points
# window: rectangle = [0, 96] x [0, 100] units (one unit = 0.1 metres)

9.23 VADeaths

The matrix VADeaths from package datasets shipped with R version 4.5.2 (2025-10-31) has (Listing 9.67)

Listing 9.67: Data: VADeaths
datasets::VADeaths |>
  print.default()
#       Rural Male Rural Female Urban Male Urban Female
# 50-54       11.7          8.7       15.4          8.4
# 55-59       18.1         11.7       24.3         13.6
# 60-64       26.9         20.3       37.0         19.3
# 65-69       41.0         30.9       54.6         35.1
# 70-74       66.0         54.3       71.1         50.0
Listing 9.68: Review: dimensions of VADeaths
datasets::VADeaths |>
  dim()
# [1] 5 4

9.24 vesicles

The point-pattern (ppp.object, Chapter 35) vesicles from package spatstat.data (v3.1.9) has (Listing 9.70, Figure 9.16)

  • the \(x\)- and \(y\)-coordinates of 37 points;
  • polygonal window;
  • no marks, i.e., 'none' mark-format.
Listing 9.69: Figure: vesicles
Code
par(mar = c(0,0,0,0))
spatstat.data::vesicles |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 9.16: vesicles
Listing 9.70: Data: vesicles
spatstat.data::vesicles |>
  spatstat.geom::print.ppp()
# Planar point pattern: 37 points
# window: polygonal boundary
# enclosing rectangle: [22.6796, 586.2292] x [11.9756, 1030.7] nm

9.25 vesicles.extra

The spatial-object list (solist, Chapter 38) vesicles.extra from package spatstat.data (v3.1.9) has (Listing 9.71, Listing 9.72)

  • a line-segment-pattern (psp, Chapter 37) $activezone
  • three windows: $mitochondria, $presynapse and $mask
Listing 9.71: Data: vesicles.extra
spatstat.data::vesicles.extra
# List of spatial objects
# 
# activezone:
# planar line segment pattern: 9 line segments
# window: rectangle = [0, 625] x [0, 1050] nm
# 
# mitochondria:
# window: polygonal boundary
# enclosing rectangle: [90.41389, 315.29187] x [532.1753, 781.4376] nm
# 
# presynapse:
# window: polygonal boundary
# enclosing rectangle: [22.6796, 586.2292] x [11.9756, 1030.7] nm
# 
# mask:
# window: binary image mask
# 420 x 250 pixel array (ny, nx)
# enclosing rectangle: [0, 250] x [0, 420] units
Listing 9.72: Review: class of members of vesicles.extra
spatstat.data::vesicles.extra |>
  lapply(FUN = class)
# $activezone
# [1] "psp"  "list"
# 
# $mitochondria
# [1] "owin"
# 
# $presynapse
# [1] "owin"
# 
# $mask
# [1] "owin"

9.26 waterstriders

The point-pattern-list (ppplist, Chapter 36) waterstriders from package spatstat.data (v3.1.9) (Listing 9.74, Figure 9.17)

Listing 9.73: Figure: waterstriders
Code
par(mar = c(0,0,0,0))
spatstat.data::waterstriders |> 
  spatstat.geom::plot.solist(main = '')
Figure 9.17: waterstriders
Listing 9.74: Data: waterstriders
spatstat.data::waterstriders
# List of point patterns
# 
# Component 1:
# Planar point pattern: 38 points
# window: rectangle = [0, 48.1] x [0, 48.1] cm
# 
# Component 2:
# Planar point pattern: 36 points
# window: rectangle = [0, 48.8] x [0, 48.8] cm
# 
# Component 3:
# Planar point pattern: 36 points
# window: rectangle = [0, 46.4] x [0, 46.4] cm
Listing 9.75: Review: class of members of waterstriders
spatstat.data::waterstriders |> 
  sapply(FUN = class)
# [1] "ppp" "ppp" "ppp"