cortar: Convert numeric to character

Description Usage Arguments Details Value Examples

View source: R/generic.R

Description

cortar divides the range of x into intervals and codes the values in x according to which interval they fall. The leftmost interval corresponds to level one, the next leftmost to level two and so on.

Usage

1
cortar(x)

Arguments

x

numeric vector which is to be converted to a character vector by cutting.

breaks

either a numeric vector of two or more unique cut points or a single number (greater than or equal to 2) giving the number of intervals into which x is to be cut.

open_left

logical, TRUE indicates to include in the interval the left limit

open_right

logica, TRUE indicates to include in the interval the right limit

dig_lab

nteger which is used when labels are not given. It determines the number of digits used in formatting the break numbers.

Details

cortar is similar to base::cut, but we have modify to use with the package bookdown

Value

a character vector with the new codification

Examples

1
2
x <- rnorm(1000)
cortar(x, breaks = -10:10)

gilberto-sassi/power documentation built on July 17, 2020, 1:02 p.m.