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
I mistakenly used by inside mutate instead of .by. But no error or warning were raised. I only found this due to a coincidence when I happen to have two pieces of code (one using by, the other using .by) producing different results.
I understand that when by= is used inside mutate, dplyr would think I am creating a new column called by with values the same as the group variable. There is nothing with the logic. I just thought an warning or something should be raised because it's such an easy mistake to make.
I mistakenly used
by
insidemutate
instead of.by
. But no error or warning were raised. I only found this due to a coincidence when I happen to have two pieces of code (one usingby
, the other using.by
) producing different results.I understand that when
by=
is used insidemutate
,dplyr
would think I am creating a new column calledby
with values the same as the group variable. There is nothing with the logic. I just thought an warning or something should be raised because it's such an easy mistake to make.Below I include a quick example
The text was updated successfully, but these errors were encountered: