Learn R Programming

spatstat.geom (version 3.2-7)

methods.boxx: Methods for Multi-Dimensional Box

Description

Methods for class "boxx".

Usage

# S3 method for boxx
print(x, ...)
  # S3 method for boxx
unitname(x)
  # S3 method for boxx
unitname(x) <- value
  # S3 method for boxx
scale(x, center=TRUE, scale=TRUE)

Value

For print.boxx the value is NULL. For unitname.boxx an object of class "units". For unitname<-.boxx and

scale.boxx the result is the updated "boxx" object x.

Arguments

x

Object of class "boxx" representing a multi-dimensional box.

...

Other arguments passed to print.default.

value

Name of the unit of length. See unitname.

center,scale

Arguments passed to scale.default to determine the rescaling.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk

Details

These are methods for the generic functions print, unitname, unitname<- and scale for the class "boxx" of multi-dimensional boxes.

The print method prints a description of the box, the unitname method extracts the name of the unit of length in which the box coordinates are expressed, while the assignment method for unitname assigns this unit name.

The scale method rescales each spatial coordinate of x.

See Also

boxx, is.boxx, print, unitname, scale

Examples

Run this code
   B <- boxx(c(0,10),c(0,10),c(0,5),c(0,1), unitname=c("metre", "metres"))
   B
   is.boxx(B)
   unitname(B)
   # Northern European usage
   unitname(B) <- "meter"
   scale(B)

Run the code above in your browser using DataLab