Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

methods.boxx

Methods for Multi-Dimensional Box


Description

Methods for class "boxx".

Usage

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

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.

Details

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

The is method checks that the object is of class "boxx", 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.

Value

For is.boxx the value is a logical. 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.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk

See Also

Examples

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

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.