exactCutBreaks {spatstat.utils}R Documentation

Determine Breakpoints for Cut

Description

Computes the numerical breakpoints used by cut.default.

Usage

exactCutBreaks(x, breaks)

Arguments

x

Numeric vector which would be converted to a factor.

breaks

Either a numeric vector of breakpoints, or a single integer giving the number of intervals into which x will be cut.

Details

This function contains a copy of the code in cut.default which determines the numerical breakpoints used to convert x to a factor. It returns the breakpoints only.

The arguments x and breaks have the same interpretation as in cut.default. Only the range of x is used in the computation, so x could be replaced by range(x).

This function would normally be used when breaks is a single integer specifying the number of intervals for the cut operation. It returns the exact numerical values of the breakpoints which are determined, but not returned, by cut.default).

Value

Numeric vector.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

See Also

cut.default

Examples

   exactCutBreaks(c(0,1), 4)

[Package spatstat.utils version 3.0-5 Index]