add_bands: Assign a band to the values of a numerical column

add_bandsR Documentation

Assign a band to the values of a numerical column

Description

Assign a band to the values of a numerical column

Usage

add_bands(
  data,
  minutes_column,
  band_cuts = c(0, 1, 5, 10, 25, 50, 100, 150, 200, 300, 500, 750, 1000, 1500, 2000),
  bands_column_name = "minutes_band",
  truncate_in_data_max = FALSE,
  number_bands = FALSE
)

Arguments

data

Table to add band

minutes_column

Name of the numerical column.

band_cuts

Numerical vector specifying the cuts of the bands.

bands_column_name

Name of the column to be created.

number_bands

Whether or not to add numbering to the bands.

Value

a column with added values

Examples

## Not run: 
add_bands(data, "minutes",
c(0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60))

## End(Not run)

telaroz/handbaloner documentation built on Nov. 25, 2024, 2:18 p.m.