crea_coorti: Trasforma un vettore numerico (possibilmente di numeri...

View source: R/crea_coorti.R

crea_coortiR Documentation

Trasforma un vettore numerico (possibilmente di numeri interi) in un factor (classi).

Description

Come base::cut con i parametri include.lowest = TRUE e right = FALSE (di default)

Usage

crea_coorti(x, breaks, include.lowest = TRUE, right = FALSE, ...)

Arguments

x

un vettore numerico (da cui si desiderano delle classi)

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.

include.lowest

logical, indicating if an 'x[i]' equal to the lowest (or highest, for right = FALSE) 'breaks' value should be included.

right

logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa.

...

further arguments passed to or from other methods.

See Also

cut

Examples

crea_coorti(x = seq(1985, 2000, by = 1), breaks = c(1985, 1990, 1995, 2000, Inf))

gibonet/gibr documentation built on Jan. 5, 2024, 7:28 a.m.