Quantile

quantile(x, probs = seq(0, 1, 0.25), na.rm = F, names = T, type = 7)

to actually create a factor based on quantiles (i.e., with even sized groups), use cut2