apache / arrow-cookbook

Apache Arrow Cookbook
https://arrow.apache.org/
Apache License 2.0
95 stars 46 forks source link

[R] Document window aggregates #311

Closed dgreiss closed 1 year ago

dgreiss commented 1 year ago

apache/arrow#35779 and apache/arrow#35709 document how to perform window aggregates

It was discussed on the mailing list: https://lists.apache.org/thread/b16ghtb8q9hyl64ks3dp9ftm7pvlnsdk to document this operation in the vignette and in the cookbook. Now that these are documented in the vignettes I thought I'd add them to the cookbook. Let me know what you think.

dgreiss commented 1 year ago

Awesome, just updated with your suggestions

thisisnic commented 1 year ago

There are a few more things that need doing before I can merge this:

  1. Add test for code blocks
  2. Add DuckDB to the dependencies in the install_dependencies script.

Do you want to do these, or do you mind me pushing to your branch and I'll do it? Happy either way.

dgreiss commented 1 year ago

I added some tests, but the tests don't match the solutions 1 for 1. I can change the tests, to test for the same number of rows and the same mean, but I thought this was a better way to test that the dplyr and arrow tables are the same.

thisisnic commented 1 year ago

I added some tests, but the tests don't match the solutions 1 for 1. I can change the tests, to test for the same number of rows and the same mean, but I thought this was a better way to test that the dplyr and arrow tables are the same.

Thanks for adding those! Updating to check for rows and means would be great - this repo is a bit different from the main Arrow repo - we have tests there that check the output values match between arrow and dplyr, so here we only want to check that the outputs in the code snippets have the values we expect.