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

View source: R/grid.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(bin_count, min_val, max_val, log_base = NULL, log_answers = TRUE)

Arguments

bin_count

Number of bins between breaks.

min_val

Value for the minimum break (fencepost).

max_val

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 == bin_count + 1


uwescience/popcycle documentation built on Jan. 29, 2025, 9:50 a.m.