volume_info <- group_by(volume_info, Date)
volume_info <- summarize(volume_info, `Volume on Date` = sum(Volume))
The first line groups by a column "Date", while the second line takes the sum of another column "Volume". On one account on my laptop and on my desktop, this works fine. However, on a different account on the same laptop (a "work" account), this throws a warning:
summarise() regrouping output by 'year' (override with .groups argument)
This then causes an error later on. In that machine, if I add the argument .groups = "drop"
, the code works fine.
So I thought I'd just add .groups = "drop"
everywhere. But then: in the machines where the original code works, what is happening is that a new column named ".group" is being added and it is filled with the value "drop"!
What is happening and how do I get the same behaviour across all machines -- especially, what's the "correct" behaviour if I want to collaborate? The code on my colleague's machines seem to work only when .groups = "drop"
is not present.