powered by
Create quantiles
xtile(x, n = 5, rev = FALSE)
Numeric variable
number of bins to create
Reverse the order of the xtiles
Approach used produces results most similar to Stata
# NOT RUN { xtile(1:10,5) xtile(1:10,5, rev = TRUE) # }
Run the code above in your browser using DataLab