Is there a way to do something like a cut()
function for binning numeric values in a dplyr
table? I'm working on a large postgres table and can currently either write a case statement in the sql at the outset, or output unaggregated data and apply cut()
. Both have pretty obvious downsides... case statements are not particularly elegant and pulling a large number of records via collect()
not at all efficient.
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
Just so there's an immediate answer for others arriving here via search engine, the n-breaks form of
cut
is now implemented as thentile
function indplyr
: