Learn R Programming

radiant.data (version 1.0.6)

xtile: Create quantiles

Description

Create quantiles

Usage

xtile(x, n = 5, rev = FALSE)

Arguments

x

Numeric variable

n

number of bins to create

rev

Reverse the order of the xtiles

Details

Approach used produces results most similar to Stata

Examples

Run this code
# NOT RUN {
xtile(1:10,5)
xtile(1:10,5, rev = TRUE)

# }

Run the code above in your browser using DataLab