Spatial datasets in the spatstat package
may include the name of the unit of length. This name is used
when printing or plotting the dataset, and in some other
applications.
unitname(x)
extracts this name,
and unitname(x) <- value
sets the name to value
.
A valid name is either
a single character string
a vector of two character strings giving the
singular and plural forms of the unit name
a list of length 3, containing two character strings
giving the singular and plural forms of the basic unit,
and a number specifying the multiple of this unit.
Note that re-setting the name of the unit of length does not
affect the numerical values in x
. It changes only the string
containing the name of the unit of length. To rescale the numerical
values, use rescale
.