You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set_denom_where() will apply on a tplyr_table object without issue, but set_denoms_by() will error because there's no method for a tplyr_table() object.
set_denom_where() is also NOT an S3 method, but set_denoms_by() is.
Side note - I don't love that one method has denoms and the other is denom...
Correct me if I'm wrong, but based on my understanding, the "by_" variable needs to be passed from "group_count(by = xxx)" to set_denoms_by, so they need to be performed within add_layer(). If that's the case, then the design for set_denoms_by and set_denom_where seem to be different. Could you provide more guidance on how to make them consistent? Do we want to use S3 method for set_denom_where() as well and make it only work within layer context?
@ShiyuC now I remember that I was vacillating one this but you make a perfect point about the by_ variable within the layer. And I also forgot that there was a separate method for shift layers.
So for the issue itself, let's keep the behavior the same - but let's add type checking into set_denom_where() to make sure the object is a tplyr_table or a tplyr_layer. Also, since I'm looking at this - can we find anywhere that's using vars() inside the package and replace it with quos()? dplyr::vars is superseded and the function itself is literally:
function (...)
{
quos(...)
}
<bytecode:0x560da4220320><environment:namespace:dplyr>
Prerequisites
For more information, see the
CONTRIBUTING
guide.Description
set_denom_where()
will apply on atplyr_table
object without issue, butset_denoms_by()
will error because there's no method for atplyr_table()
object.set_denom_where()
is also NOT an S3 method, butset_denoms_by()
is.Side note - I don't love that one method has
denoms
and the other isdenom
...Steps to Reproduce (Bug Report Only)
Expected behavior: [What you expected to happen]
Consistent error or success of the method application
Actual behavior: [What actually happened]
set_denoms_by()
errors, butset_denom_where()
succeeds.Versions
Current devel branch
The text was updated successfully, but these errors were encountered: