Learn R Programming

spatstat.utils (version 3.1-2)

exactCutBreaks: Determine Breakpoints for Cut

Description

Computes the numerical breakpoints used by cut.default.

Usage

exactCutBreaks(x, breaks)

Value

Numeric vector.

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.

Author

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

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).

See Also

Examples

Run this code
   exactCutBreaks(c(0,1), 4)

Run the code above in your browser using DataLab