unitname(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
"unitname"(x)
unitname(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"unitname"(x) <- value
"ppp"
),
a line segment pattern (object of class "psp"
),
a window (object of class "owin"
),
a pixel image (object of class "im"
),
a tessellation (object of class "tess"
),
a quadrature scheme (object of class "quad"
),
or a fitted point process model
(object of class "ppm"
or "kppm"
or "slrm"
or "dppm"
or "minconfit"
).
unitname
is an object of class "units"
containing the name of the unit of length in x
. There are
methods for print
and summary
.
unitname(x)
extracts this name,
and unitname(x) <- value
sets the name to value
.
A valid name is either
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
.
rescale
,
owin
,
ppp
X <- runifpoint(20)
# if the unit of length is 1 metre:
unitname(X) <- c("metre", "metres")
# if the unit of length is 6 inches:
unitname(X) <- list("inch", "inches", 6)
Run the code above in your browser using DataLab