10  Data Sets

Chapter 10 lists several, though not all, data objects from package spatstat.data, along with selected inspections of these objects. The function calls shown in Chapter 10 are exclusively those provided by the spatstat.* family of packages.


The author uses the data sets provided in package spatstat.data (v3.1.9) to demonstrate the use of most functions in package groupedHyperframe (v0.3.2).


10.1 anemones

The point-pattern (ppp.object, Chapter 27) anemones from package spatstat.data (v3.1.9) has (Listing 10.2, Figure 10.1)

Listing 10.1: Figure: anemones
Code
par(mar = c(0,0,0,0))
spatstat.data::anemones |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 10.1: anemones
Listing 10.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 10.3: Review: number of points in anemones
Code
spatstat.data::anemones |>
  spatstat.geom::npoints.ppp()
# [1] 231
Listing 10.4: Review: window of anemones
Code
spatstat.data::anemones |>
  spatstat.geom::Window.ppp()
# window: rectangle = [0, 280] x [0, 180] units
Listing 10.5: Review: marks of anemones
Code
list(
  summary.stats = spatstat.data::anemones |>
    spatstat.geom::marks.ppp() |>
    summary.default(),
  typeof = spatstat.data::anemones |>
    spatstat.geom::marks.ppp() |>
    typeof()
)
# $summary.stats
#    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#   2.000   3.000   4.000   4.294   5.000   8.000 
# 
# $typeof
# [1] "integer"
Listing 10.6: Review: markformat of anemones
Code
spatstat.data::anemones |>
  spatstat.geom::markformat.ppp()
# [1] "vector"

10.2 ants

The point-pattern (ppp.object, Chapter 27) ants from package spatstat.data (v3.1.9) has (Listing 10.8, Figure 10.2)

  • 97 points;
  • polygonal window;
  • one multi-type-mark with two levels, 'Cataglyphis' and 'Messor' (Listing 10.9);
  • 'vector'-markformat.
Listing 10.7: Figure: ants
Code
par(mar = c(0,0,0,0))
spatstat.data::ants |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 10.2: ants
Listing 10.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 10.9: Review: marks of ants
Code
spatstat.data::ants |>
  spatstat.geom::marks.ppp() |>
  table()
# 
# Cataglyphis      Messor 
#          29          68

10.3 austates

The tessellation (Chapter 31) austates from package spatstat.data (v3.1.9) has (Listing 10.11, Figure 10.3)

Listing 10.10: Figure: austates
Code
par(mar = c(0,0,1,0))
spatstat.data::austates |>
  spatstat.geom::plot.tess()
Figure 10.3: austates
Listing 10.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 10.12: Review: tiles in austates
Code
spatstat.data::austates$tiles
# $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
# 
# $SA
# window: polygonal boundary
# enclosing rectangle: [129.01141, 141.0076] x [-37.96578, -25.98859] degrees
# 
# $QLD
# window: polygonal boundary
# enclosing rectangle: [138.0038, 153.47909] x [-29.163498, -10.931559] degrees
# 
# $NSW
# window: polygonal boundary
# enclosing rectangle: [141.0076, 153.6692] x [-37.45247, -28.07985] degrees
# 
# $VIC
# window: polygonal boundary
# enclosing rectangle: [140.95057, 149.79087] x [-39.04943, -33.91635] degrees
# 
# $TAS
# window: polygonal boundary
# enclosing rectangle: [144.63878, 148.34601] x [-43.59316, -40.58935] degrees

10.4 betacells

The point-pattern (ppp.object, Chapter 27) betacells from package spatstat.data (v3.1.9) has (Listing 10.14, Figure 10.4)

Listing 10.13: Figure: betacells
Code
par(mar = c(0,0,1,0))
spatstat.data::betacells |>
  spatstat.geom::plot.ppp()
Figure 10.4: betacells
Listing 10.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 10.15: Review: markformat of betacells
Code
spatstat.data::betacells |>
  spatstat.geom::markformat.ppp()
# [1] "dataframe"
Listing 10.16: Review: marks of betacells
Code
spatstat.data::betacells |>
  spatstat.geom::marks.ppp() |>
  head(n = 3L)
#   type  area
# 1   on 275.9
# 2  off 241.2
# 3   on 256.0

10.5 bronzefilter

The point-pattern (ppp.object, Chapter 27) bronzefilter from package spatstat.data (v3.1.9) has (Listing 10.18, Figure 10.5)

  • 678 points;
  • rectangle window;
  • one numeric-mark.
Listing 10.17: Figure: bronzefilter
Code
par(mar = c(0,1,0,0))
spatstat.data::bronzefilter |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 10.5: bronzefilter
Listing 10.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

10.6 btb.extra

The point-pattern list (ppplist, Chapter 28) btb.extra from package spatstat.data (v3.1.9) (Listing 10.20, Figure 10.6)

Listing 10.19: Figure: btb.extra
Code
par(mar = c(0,1,1,1))
spatstat.data::btb.extra |> 
  spatstat.geom::plot.solist() |>
  suppressWarnings() |> suppressMessages()
Figure 10.6: btb.extra
Listing 10.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 10.21: Review: inheritance of btb.extra
Code
spatstat.data::btb.extra |> 
  class()
# [1] "ppplist" "solist"  "anylist" "listof"  "list"
Listing 10.22: Review: class of members of btb.extra
Code
spatstat.data::btb.extra |> 
  sapply(FUN = class)
#     full standard 
#    "ppp"    "ppp"

10.7 cetaceans

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

  • 9 rows and 4 (hyper)columns (Listing 10.24)
  • four point-pattern (ppp, Chapter 27) hypercolumns: $whales, $dolphins, $fish and $plankton. Each point-pattern hypercolumn is a point-pattern list (ppplist, Chapter 28).
Listing 10.23: 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)
# 4  (ppp)    (ppp) (ppp)    (ppp)
# 5  (ppp)    (ppp) (ppp)    (ppp)
# 6  (ppp)    (ppp) (ppp)    (ppp)
# 7  (ppp)    (ppp) (ppp)    (ppp)
# 8  (ppp)    (ppp) (ppp)    (ppp)
# 9  (ppp)    (ppp) (ppp)    (ppp)
Listing 10.24: Review: dimensions of cetaceans
Code
spatstat.data::cetaceans |>
  spatstat.geom::dim.hyperframe()
# [1] 9 4

10.8 demohyper

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

  • 3 rows and 3 (hyper)columns (Listing 10.26)
  • a regular column $Group,
  • a point-pattern (ppp, Chapter 27) hypercolumn $Points, and
  • a pixel-image (im, Chapter 22) hypercolumn $Image.

To view demohyper in a desired format, readers may use either one of the following approaches,

  • call library(spatstat.geom), then call the S3 generic function base::print() by simply typing the object’s name at the console prompt and pressing Enter;
  • call library(groupedHyperframe), then call the S3 generic function base::print() by simply typing the object’s name at the console prompt and pressing Enter. This approach works as intended, since package groupedHyperframe (v0.3.2) Imports the package spatstat.geom (v3.6.1);
  • call the S3 method spatstat.geom::print.hyperframe() directly (Listing 10.25).
Listing 10.25: 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 10.26: Review: dimensions of demohyper
Code
spatstat.data::demohyper |>
  spatstat.geom::dim.hyperframe()
# [1] 3 3

To find the (hyper)column names of demohyper, readers may use either one of the following approaches,

  • call library(spatstat.geom), then call the .Primitive S3 generic function base::names();
  • call library(groupedHyperframe), then call the .Primitive S3 generic function base::names(). This approach works as intended, since package groupedHyperframe (v0.3.2) Imports the package spatstat.geom (v3.6.1);
  • call the S3 method spatstat.geom::names.hyperframe() directly (Listing 10.27).
Listing 10.27: Review: (hyper)column names of demohyper
spatstat.data::demohyper |>
  spatstat.geom::names.hyperframe()
# [1] "Points" "Image"  "Group"

To observe the ppp-hypercolumn demohyper$Points and the im-hypercolumn demohyper$Image, readers may use either one of the following approaches,

  • call library(spatstat.geom), then call the .Primitive S3 generic function base::`$`;
  • call library(groupedHyperframe), then call the .Primitive S3 generic function base::`$`. This approach works as intended, since package groupedHyperframe (v0.3.2) Imports the package spatstat.geom (v3.6.1), as in Listing 10.28;
  • call the S3 method spatstat.geom::`$.hyperframe` directly (Listing 10.29).
Listing 10.28: Review: observe ppp-hypercolumn demohyper$Points
spatstat.data::demohyper$Points |>
  class()
# [1] "ppplist" "solist"  "anylist" "listof"  "list"
Listing 10.29: Advanced: observe ppp-hypercolumn demohyper$Points, super nerdy way!
Code
spatstat.data::demohyper |>
  spatstat.geom::`$.hyperframe`(name = 'Points') |> # only if you know what you are doing!!
  class()
# [1] "ppplist" "solist"  "anylist" "listof"  "list"
Review: observe the 1st ppp.object in ppp-hypercolumn demohyper$Points
spatstat.data::demohyper$Points[[1L]] |>
  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
if (FALSE) {
  spatstat.data::demohyper$Points[[1L]] |>
    spatstat.geom::plot.ppp()
} # figure suppressed to reduce vignette size
Review: observe im-hypercolumn demohyper$Image
spatstat.data::demohyper$Image
# List of pixel images
# 
# 1:
# real-valued pixel image
# 53 x 39 pixel array (ny, nx)
# enclosing rectangle: [2.017, 3.93] x [0.645, 3.278] units
# 
# 2:
# real-valued pixel image
# 39 x 53 pixel array (ny, nx)
# enclosing rectangle: [0.645, 3.278] x [2.017, 3.93] units
# 
# 3:
# real-valued pixel image
# 39 x 53 pixel array (ny, nx)
# enclosing rectangle: [-3.278, -0.645] x [-3.93, -2.017] units
spatstat.data::demohyper$Image |>
  class()
# [1] "imlist"  "solist"  "anylist" "listof"  "list"
Review: observe the 1st im.object in im-hypercolumn demohyper$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
if (FALSE) {
  spatstat.data::demohyper$Image[[1L]] |>
    spatstat.geom::plot.im()
} # figure suppressed to reduce vignette size

10.9 finpines

The point-pattern (ppp.object, Chapter 27) finpines from package spatstat.data (v3.1.9) has (Listing 10.31, Figure 10.7)

  • 126 points;
  • rectangle window;
  • two numeric-marks, diameter and height.
Listing 10.30: Figure: finpines
Code
par(mar = c(0,0,1,0))
spatstat.data::finpines |>
  spatstat.geom::plot.ppp()
Figure 10.7: finpines
Listing 10.31: 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

10.10 flu

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

  • 41 rows and 4 (hyper)columns (Listing 10.33)
  • point-pattern (ppp, Chapter 27) hypercolumn $pattern, which is a point-pattern list (ppplist, Chapter 28);
  • regular columns $virustype, $stain, $frameid
Listing 10.32: Data: flu
Code
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
# wt M2-M1 43      (ppp)        wt M2-M1      43
# wt M2-M1 49      (ppp)        wt M2-M1      49
# wt M2-M1 65      (ppp)        wt M2-M1      65
# wt M2-M1 71      (ppp)        wt M2-M1      71
# wt M2-M1 84      (ppp)        wt M2-M1      84
# wt M2-HA 3       (ppp)        wt M2-HA       3
# wt M2-HA 4       (ppp)        wt M2-HA       4
# wt M2-HA 5       (ppp)        wt M2-HA       5
# wt M2-HA 17      (ppp)        wt M2-HA      17
# wt M2-HA 54      (ppp)        wt M2-HA      54
# wt M2-HA 74      (ppp)        wt M2-HA      74
# wt M2-HA 78      (ppp)        wt M2-HA      78
# wt M2-HA 82      (ppp)        wt M2-HA      82
# wt M2-HA 85      (ppp)        wt M2-HA      85
# wt M2-HA 100     (ppp)        wt M2-HA     100
# wt M2-HA 110     (ppp)        wt M2-HA     110
# mut1 M2-M1 11    (ppp)      mut1 M2-M1      11
# mut1 M2-M1 13    (ppp)      mut1 M2-M1      13
# mut1 M2-M1 15    (ppp)      mut1 M2-M1      15
# mut1 M2-M1 17    (ppp)      mut1 M2-M1      17
# mut1 M2-M1 28    (ppp)      mut1 M2-M1      28
# mut1 M2-M1 29    (ppp)      mut1 M2-M1      29
# mut1 M2-M1 33    (ppp)      mut1 M2-M1      33
# mut1 M2-M1 38    (ppp)      mut1 M2-M1      38
# mut1 M2-M1 41    (ppp)      mut1 M2-M1      41
# mut1 M2-M1 44    (ppp)      mut1 M2-M1      44
# mut1 M2-M1 59    (ppp)      mut1 M2-M1      59
# mut1 M2-HA 8     (ppp)      mut1 M2-HA       8
# mut1 M2-HA 14    (ppp)      mut1 M2-HA      14
# mut1 M2-HA 23    (ppp)      mut1 M2-HA      23
# mut1 M2-HA 42    (ppp)      mut1 M2-HA      42
# mut1 M2-HA 51    (ppp)      mut1 M2-HA      51
# mut1 M2-HA 59    (ppp)      mut1 M2-HA      59
# mut1 M2-HA 73    (ppp)      mut1 M2-HA      73
# mut1 M2-HA 79    (ppp)      mut1 M2-HA      79
# mut1 M2-HA 86    (ppp)      mut1 M2-HA      86
# mut1 M2-HA 104   (ppp)      mut1 M2-HA     104
# mut1 M2-HA 147   (ppp)      mut1 M2-HA     147
Listing 10.33: Review: dimensions of flu
Code
spatstat.data::flu |>
  spatstat.geom::dim.hyperframe()
# [1] 41  4

10.11 gorillas

The point-pattern (ppp.object, Chapter 27) gorillas from package spatstat.data (v3.1.9) has (Listing 10.35, Figure 10.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 10.34: Figure: gorillas
Code
par(mar = c(0,0,1,0))
spatstat.data::gorillas |>
  spatstat.geom::plot.ppp(which.marks = c('group', 'season'))
Figure 10.8: gorillas
Listing 10.35: 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

10.12 gorillas.extra

The pixel-image list (imlist, Chapter 23) gorillas.extra from package spatstat.data (v3.1.9) (Listing 10.37, Figure 10.9)

Listing 10.36: Figure: gorillas.extra
Code
par(mar = c(0,1,1,1))
spatstat.data::gorillas.extra |> 
  plot() |>
  suppressWarnings() |> suppressMessages()
Figure 10.9: gorillas.extra
Listing 10.37: Data: gorillas.extra
Code
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
# 
# heat:
# factor-valued pixel image
# factor levels:
# [1] "Warmest"  "Moderate" "Coolest" 
# 149 x 181 pixel array (ny, nx)
# enclosing rectangle: [580440, 586000] x [674160, 678730] metres
# 
# slopeangle:
# real-valued pixel image
# 149 x 181 pixel array (ny, nx)
# enclosing rectangle: [580440, 586000] x [674160, 678730] metres
# 
# slopetype:
# factor-valued pixel image
# factor levels:
# [1] "Valley"   "Toe"      "Flat"     "Midslope" "Upper"    "Ridge"   
# 149 x 181 pixel array (ny, nx)
# enclosing rectangle: [580440, 586000] x [674160, 678730] metres
# 
# vegetation:
# factor-valued pixel image
# factor levels:
# [1] "Disturbed"  "Colonising" "Grassland"  "Primary"    "Secondary"  "Transition"
# 149 x 181 pixel array (ny, nx)
# enclosing rectangle: [580440, 586000] x [674160, 678730] metres
# 
# waterdist:
# real-valued pixel image
# 149 x 181 pixel array (ny, nx)
# enclosing rectangle: [580440, 586000] x [674160, 678730] metres
Listing 10.38: Review: inheritance of gorillas.extra
Code
spatstat.data::gorillas.extra |> 
  class()
# [1] "imlist"  "solist"  "anylist" "listof"  "list"
Listing 10.39: Review: class of members of gorillas.extra
Code
spatstat.data::gorillas.extra |> 
  sapply(FUN = class)
#     aspect  elevation       heat slopeangle  slopetype vegetation  waterdist 
#       "im"       "im"       "im"       "im"       "im"       "im"       "im"

10.13 Kovesi

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

  • 41 rows and 13 (hyper)columns (Listing 10.41)
  • regular columns $linear, $diverging, etc.
  • a character hypercolumn $values, which is a list of character vectors (anylist, Chapter 13)
Listing 10.40: Data: Kovesi
Code
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)
# 6   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE  mygbm 30  95   78 256    25 (character)
# 7   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE  wrwbw 40  90   42 256     0 (character)
# 8   FALSE     FALSE   FALSE   TRUE       FALSE   FALSE  wrwbw 40  90   42 256    25 (character)
# 9   FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    bkr 55  10   35 256     0 (character)
# 10  FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    bky 60  10   30 256     0 (character)
# 11  FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    bwr 40  95   42 256     0 (character)
# 12  FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    bwr 55  98   37 256     0 (character)
# 13  FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    cwm 80 100   22 256     0 (character)
# 14  FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    gkr 60  10   40 256     0 (character)
# 15  FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    gwr 55  95   38 256     0 (character)
# 16  FALSE      TRUE   FALSE  FALSE       FALSE   FALSE    gwv 55  95   39 256     0 (character)
# 17  FALSE      TRUE   FALSE  FALSE        TRUE   FALSE    cjm 75  75   24 256     0 (character)
# 18  FALSE      TRUE   FALSE  FALSE        TRUE   FALSE    cjo 70  70   25 256     0 (character)
# 19   TRUE      TRUE   FALSE  FALSE       FALSE   FALSE    bjr 30  55   53 256     0 (character)
# 20   TRUE      TRUE   FALSE  FALSE       FALSE   FALSE    bjy 30  90   45 256     0 (character)
# 21  FALSE      TRUE    TRUE  FALSE       FALSE   FALSE  bgymr 45  85   67 256     0 (character)
# 22  FALSE     FALSE   FALSE  FALSE        TRUE   FALSE    cgo 70  70   39 256     0 (character)
# 23  FALSE     FALSE   FALSE  FALSE        TRUE   FALSE    cgo 80  80   38 256     0 (character)
# 24  FALSE     FALSE   FALSE  FALSE        TRUE   FALSE     cm 70  70   39 256     0 (character)
# 25   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE      b  5  95   73 256     0 (character)
# 26   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE      b 95  50   20 256     0 (character)
# 27   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE    bgy 10  95   74 256     0 (character)
# 28   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE    bmw  5  95   89 256     0 (character)
# 29   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE    bmy 10  95   78 256     0 (character)
# 30   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE      g  5  95   69 256     0 (character)
# 31   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE    gow 60  85   27 256     0 (character)
# 32   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE    gow 65  90   35 256     0 (character)
# 33   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE      j  0 100    0 256     0 (character)
# 34   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE      j 10  95    0 256     0 (character)
# 35   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE    kry  5  98   75 256     0 (character)
# 36   TRUE     FALSE   FALSE  FALSE       FALSE   FALSE   kryw  5 100   67 256     0 (character)
# 37   TRUE     FALSE   FALSE  FALSE       FALSE    TRUE      b  0  44   57 256     0 (character)
# 38   TRUE     FALSE   FALSE  FALSE       FALSE    TRUE      g  0  46   42 256     0 (character)
# 39   TRUE     FALSE   FALSE  FALSE       FALSE    TRUE      r  0  50   52 256     0 (character)
# 40  FALSE     FALSE    TRUE  FALSE       FALSE   FALSE   bgyr 35  85   73 256     0 (character)
# 41  FALSE     FALSE    TRUE  FALSE       FALSE   FALSE  bgyrm 35  85   71 256     0 (character)
Listing 10.41: Review: dimensions of Kovesi
Code
spatstat.data::Kovesi |>
  spatstat.geom::dim.hyperframe()
# [1] 41 13

10.14 longleaf

The point-pattern (ppp.object, Chapter 27) longleaf from package spatstat.data (v3.1.9) has (Listing 10.43, Figure 10.10)

  • 584 points;
  • rectangle window;
  • one numeric-mark.
Listing 10.42: Figure: longleaf
Code
par(mar = c(0,0,0,0))
spatstat.data::longleaf |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 10.10: longleaf
Listing 10.43: 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

10.15 nbfires

The point-pattern (ppp.object, Chapter 27) nbfires from package spatstat.data (v3.1.9) has (Listing 10.45, Figure 10.11)

  • 7108 points;
  • polygonal window;
  • multi-type-marks, e.g., $fire.type, $cause and $ign.src;
  • numeric-marks, e.g., $fnl.size.
Listing 10.44: 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 10.11: nbfires
Listing 10.45: 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)

10.16 osteo

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

  • 40 rows and 5 (hyper)columns (Listing 10.47)
  • the serial number of sampling volume $brick nested in the bone sample $id
  • a three-dimensional point-pattern (pp3, Chapter 26) hypercolumn $pts
Listing 10.46: Data: osteo
Code
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
# 6   c77za4       4     6 (pp3)    90
# 7   c77za4       4     7 (pp3)    95
# 8   c77za4       4     8 (pp3)    65
# 9   c77za4       4     9 (pp3)   100
# 10  c77za4       4    10 (pp3)   100
# 11  c77za5       5     1 (pp3)    45
# 21  c77za5       5     2 (pp3)    30
# 31  c77za5       5     3 (pp3)    40
# 41  c77za5       5     4 (pp3)    45
# 51  c77za5       5     5 (pp3)    40
# 61  c77za5       5     6 (pp3)    50
# 71  c77za5       5     7 (pp3)    40
# 81  c77za5       5     8 (pp3)    60
# 91  c77za5       5     9 (pp3)    65
# 101 c77za5       5    10 (pp3)    60
# 12  c77za8       8     1 (pp3)    40
# 22  c77za8       8     2 (pp3)    55
# 32  c77za8       8     3 (pp3)    60
# 42  c77za8       8     4 (pp3)    50
# 52  c77za8       8     5 (pp3)    45
# 62  c77za8       8     6 (pp3)    30
# 72  c77za8       8     7 (pp3)    50
# 82  c77za8       8     8 (pp3)    45
# 92  c77za8       8     9 (pp3)    70
# 102 c77za8       8    10 (pp3)   110
# 13  c77za9       9     1 (pp3)    60
# 23  c77za9       9     2 (pp3)    65
# 33  c77za9       9     3 (pp3)    55
# 43  c77za9       9     4 (pp3)    70
# 53  c77za9       9     5 (pp3)    55
# 63  c77za9       9     6 (pp3)   100
# 73  c77za9       9     7 (pp3)    80
# 83  c77za9       9     8 (pp3)    75
# 93  c77za9       9     9 (pp3)    85
# 103 c77za9       9    10 (pp3)    60
Listing 10.47: Review: dimensions of osteo
Code
spatstat.data::osteo |>
  spatstat.geom::dim.hyperframe()
# [1] 40  5

10.17 spruces

The point-pattern (ppp.object, Chapter 27) spruces from package spatstat.data (v3.1.9) has (Listing 10.49, Figure 10.12)

  • 134 points;
  • rectangle window;
  • one numeric-mark.
Listing 10.48: Figure: spruces
Code
par(mar = c(0,0,0,0))
spatstat.data::spruces |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 10.12: spruces
Listing 10.49: 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

10.18 swedishpines

The point-pattern (ppp.object, Chapter 27) swedishpines from package spatstat.data (v3.1.9) has (Listing 10.51, Figure 10.13)

  • the \(x\)- and \(y\)-coordinates of 71 points;
  • rectangle window;
  • no marks, i.e., 'none'-markformat.
Listing 10.50: Figure: swedishpines
Code
par(mar = c(0,0,0,0))
spatstat.data::swedishpines |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 10.13: swedishpines
Listing 10.51: 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)

10.19 vesicles

The point-pattern (ppp.object, Chapter 27) vesicles from package spatstat.data (v3.1.9) has (Listing 10.53, Figure 10.14)

  • the \(x\)- and \(y\)-coordinates of 37 points;
  • polygonal window;
  • no marks, i.e., 'none'-markformat.
Listing 10.52: Figure: vesicles
Code
par(mar = c(0,0,0,0))
spatstat.data::vesicles |>
  spatstat.geom::plot.ppp(main = NULL)
Figure 10.14: vesicles
Listing 10.53: 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

10.20 vesicles.extra

The spatial object list (solist, Chapter 30) vesicles.extra from package spatstat.data (v3.1.9) has (Listing 10.54, Listing 10.55)

  • a line-segment-pattern (psp, Chapter 29) $activezone
  • three windows: $mitochondria, $presynapse and $mask
Listing 10.54: Data: vesicles.extra
Code
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 10.55: Review: class of members of vesicles.extra
Code
spatstat.data::vesicles.extra |>
  lapply(FUN = class)
# $activezone
# [1] "psp"  "list"
# 
# $mitochondria
# [1] "owin"
# 
# $presynapse
# [1] "owin"
# 
# $mask
# [1] "owin"

10.21 waterstriders

The point-pattern list (ppplist, Chapter 28) waterstriders from package spatstat.data (v3.1.9) (Listing 10.57, Figure 10.15)

Listing 10.56: Figure: waterstriders
Code
par(mar = c(0,1,1,1))
spatstat.data::waterstriders |> 
  spatstat.geom::plot.solist()
Figure 10.15: waterstriders
Listing 10.57: 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 10.58: Review: class of members of waterstriders
Code
spatstat.data::waterstriders |> 
  sapply(FUN = class)
# [1] "ppp" "ppp" "ppp"