rounding(x)## S3 method for class 'default':
rounding(x)
## S3 method for class 'ppp':
rounding(x)
## S3 method for class 'pp3':
rounding(x)
## S3 method for class 'ppx':
rounding(x)
x
,
this function determines whether the values have been rounded
to a certain number of decimal places.
x
are not all integers, thenrounding(x)
returns the smallest number of digitsd
after the decimal point
such thatround(x, digits=d)
is identical tox
.
For example ifrounding(x) = 2
then the entries ofx
are rounded to 2 decimal places, and are multiples of 0.01.x
are integers, thenrounding(x)
returns-d
, whered
is the smallest number of digitsbeforethe decimal point
such thatround(x, digits=-d)
is identical tox
.
For example ifrounding(x) = -3
then the entries ofx
are multiples of 1000.
Ifrounding(x) = 0
then the entries ofx
are integers
but not multiples of 10.x
are equal to 0, the rounding is
not determined, and a value ofNULL
is returned."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