powered by
Create a quintile (or decile) index
xtile(x, n, rev = FALSE)
Numeric variable
number of bins to create
Reverse the order of the xtiles
Same as stata
# NOT RUN { xtile(1:10,5) xtile(1:10,5, rev = TRUE) # }
Run the code above in your browser using DataLab