DavisVaughan/ivs

ivs doesn't respect multiple items in group_by()

Closed this issue · 3 comments

Hello,

I don't have an example I can easily share, but I've discovered that ivs operations (specifically set operations) don't seem to work when there is more than 1 group by level.

For example, group_by(person_id) is fine, but group_by(person_id, location_id) does not work. It seems to calculate set operations of all rows in the first group level against all other rows. This isn't what you would expect if it were grouped by multiple levels.

Thanks,

Adam

The grouping is fully controlled by dplyr, ivs will be handed just the group corresponding to the current (person_id, location_id) combination, so I don't think there is anything wrong in ivs. I'd have to see a full reprex though.

If you've never heard of a reprex before, you might want to start by reading the tidyverse.org help page.

You can install reprex by running (you may already have it, though, if you have the tidyverse package installed):

install.packages("reprex")

It seems that after updating some other packages today group_by() seems to function properly with IVS. Running the same code as I did the other day, so I'm not entirely certain what changed. But it is working.