Open chrisvoorpostel opened 7 years ago
I guess it kind of breaks the rule that the LHS of LHS ~ RHS
determines the rows in the result. I like the .FA
idea, but then there's the question of how to do this if you have multiple value.var
(which for me is more common than multiple functions). Maybe also have .VV
, with .FA + .VV + x ~ y
meaning fun.agg and value.var get separate cols; and maybe even allowing the combination rule to be set, paste0(.FA, .VV) + x ~ y
or something.
I think it keeps the rule - you are just explicitly setting what you are seeing in the row (whether it is .FA or .VV). If anything the current functionality breaks the rule that RHS is the columns of the result (if that is a rule), because .VV and .FA are implicitly column-wise.
I also like the .VV idea, as it allows for things like .FA + x ~ y + .VV
, or any order of, keeping the same syntax
It would be nice to be able to choose how fun.aggregates are propagated when more than one are used.
For example, if I have:
The equations are repeated by binding the results together column-wise. Instead, I'd like to do the equivalent of this, directly from the syntax of dcast:
which gets fairly messy with many functions + columns.
This feels like a reasonable extension of the casting syntax. Maybe something like:
to allow for control of where the measures are split.