create_breaks: Create breaks vector that can be used with cut().

View source: R/psd.R

create_breaksR Documentation

Create breaks vector that can be used with cut().

Description

Create breaks vector that can be used with cut().

Usage

create_breaks(bins, minval, maxval, log_base = NULL, log_answers = TRUE)

Arguments

bins

Number of bins between breaks.

minval

Value for the minimum break (fencepost).

maxval

Value for the maximum break (fencepost).

log_base

Log base to use when creating log-spaced bins for distribution. If NULL the breaks will not be log-spaced.

log_answers

If log_base is provided, this determines whether the break values themselves are log values or not. e.g. if TRUE breaks may be [1, 2, 3], if FALSE breaks may be [10, 100, 1000].

Value

Vector defining breaks for use with cut(), length == bins + 1


armbrustlab/popcycle documentation built on April 1, 2024, 2:41 p.m.