scaletointerval

0th

Percentile

Rescale Data to Lie Between Specified Limits

Rescales a dataset so that the values range exactly between the specified limits.

Keywords
methods, spatial, univar
Usage
scaletointerval(x, from=0, to=1)
  ## S3 method for class 'default':
scaletointerval(x, from=0, to=1)
  ## S3 method for class 'im':
scaletointerval(x, from=0, to=1)
Arguments
x
Data to be rescaled.
from,to
Lower and upper endpoints of the interval to which the values of x should be rescaled.
Details

These functions rescale a dataset x so that its values range exactly between the limits from and to.

The method for pixel images (objects of class "im") applies this scaling to the pixel values of x. Rescaling cannot be performed if the values in x are not interpretable as numeric, or if the values in x are all equal.

Value

  • An object of the same type as x.

See Also

scale

Aliases
  • scaletointerval
  • scaletointerval.default
  • scaletointerval.im
Examples
X <- as.im(function(x,y) {x+y+3}, unit.square())
  summary(X)
  Y <- scaletointerval(X)
  summary(Y)
Documentation reproduced from package spatstat, version 1.25-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.