rounding(x)
"rounding"(x)
"rounding"(x)
"rounding"(x)
"rounding"(x)
x
,
this function determines whether the values have been rounded
to a certain number of decimal places.
x
are not all integers, then
rounding(x)
returns the smallest number of digits d
after the decimal point
such that round(x, digits=d)
is identical to
x
.
For example if rounding(x) = 2
then the entries of
x
are rounded to 2 decimal places, and are multiples of 0.01.
x
are integers, then
rounding(x)
returns -d
, where
d
is the smallest number of digits before the decimal point
such that round(x, digits=-d)
is identical to
x
.
For example if rounding(x) = -3
then the entries of
x
are multiples of 1000.
If rounding(x) = 0
then the entries of x
are integers
but not multiples of 10.
x
are equal to 0, the rounding is
not determined, and a value of NULL
is returned.
For a point pattern (object of class "ppp"
)
or similar object x
containing numeric spatial
coordinates, this procedure is applied to the spatial coordinates.
round.ppp
rounding(c(0.1, 0.3, 1.2))
rounding(c(1940, 1880, 2010))
rounding(0)
rounding(cells)
Run the code above in your browser using DataLab