interval_labels

0th

Percentile

Convenience functions for interval recodes

Get interval labels for even intervals of discrete numeric values compatible with base::cut.

Usage
interval_labels(from, to, width = 5)
Arguments
from, to

A numeric value for the beginning and the end of the interval.

width

The width of the interval, e.g. 5 (default) for intervals 0-5.

Value

A character vector of interval labels compatible with base::cut.

Aliases
  • interval_labels
Examples
# NOT RUN {
x       <- round(runif(100, 0, 100), 0)
labels  <- interval_labels(0, 100, 10)

cut(x, breaks = seq(0, 100, 10), labels = labels)
# }
Documentation reproduced from package tadaatoolbox, version 0.16.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.