ntile: Compute the n-tiles of x based on the breakpoints of y

View source: R/ntile.R

ntileR Documentation

Compute the n-tiles of x based on the breakpoints of y

Description

Compute the n-tiles of x based on the breakpoints of y

Usage

ntile(x, n, y = x)

Arguments

x

a numeric vector.

n

integer (e.g., 10 for deciles) or vector of probabilities (e.g. c(0, 0.3, 0.7, 1) to split in quantiles 0-30, 30-70, 70-100)

y

a numeric vector to compute the breakpoints.

Value

integer vector


eguidotti/eap documentation built on Sept. 4, 2024, 3:43 a.m.