Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace use of rowsums in tidyr episode #535

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jessesadler
Copy link
Contributor

Close #531

  • Use grouped mutate() instead of rowSums() to create summary columns. This is more in line with tidyverse usage and fixes a mistake in lesson where no household was shown to have 0 items.
  • Explain use of grouped mutate() and dplyr if_else() function.
  • Create new exercise to do the same with months lacking food.
  • Remove exercise in pivot longer that replicated earlier calculations in a confusing manner.
  • Change code to recreate interviews_plotting in ggplot2 episode using new method.
  • Change interviews_plotting data using new method.

* Remove use of rowSums() and explain use of grouped mutate() and use of if_else().
* Reflowed some of the text
* Add exercise to create months_lack_food dataframe
* Removed exercise under Pivot Longer section that redid earlier summary of items owned.
Copy link

github-actions bot commented Oct 15, 2024

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/datacarpentry/r-socialsci/compare/md-outputs..md-outputs-PR-535

The following changes were observed in the rendered markdown documents:

 04-tidyr.md                                        | 195 ++++++++-------
 05-ggplot2.md                                      |  30 +--
 data/download_data.R                               |  30 ++-
 data/interviews_plotting.csv                       | 264 ++++++++++-----------
 data_output/interviews_plotting.csv                | 264 ++++++++++-----------
 fig/05-ggplot2-rendered-adding-colors-1.png        | Bin 17634 -> 19178 bytes
 fig/05-ggplot2-rendered-adding-jitter-1.png        | Bin 9107 -> 9220 bytes
 fig/05-ggplot2-rendered-adding-transparency-1.png  | Bin 7238 -> 7415 bytes
 fig/05-ggplot2-rendered-adding-width-height-1.png  | Bin 8824 -> 9159 bytes
 fig/05-ggplot2-rendered-boxplot-exercise-1.png     | Bin 10204 -> 10156 bytes
 ...-ggplot2-rendered-boxplot-exercise-factor-1.png | Bin 21328 -> 21311 bytes
 fig/05-ggplot2-rendered-boxplot-with-jitter-1.png  | Bin 16684 -> 17087 bytes
 fig/05-ggplot2-rendered-color-by-species-1.png     | Bin 19360 -> 20860 bytes
 ...5-ggplot2-rendered-color-by-species-notes-1.png | Bin 20542 -> 20526 bytes
 fig/05-ggplot2-rendered-create-ggplot-object-1.png | Bin 6952 -> 7004 bytes
 fig/05-ggplot2-rendered-first-ggplot-1.png         | Bin 6952 -> 7004 bytes
 fig/05-ggplot2-rendered-scatter-challenge-1.png    | Bin 18837 -> 19905 bytes
 fig/05-ggplot2-rendered-violin-plot-1.png          | Bin 27833 -> 27924 bytes
 md5sum.txt                                         |   4 +-
 19 files changed, 409 insertions(+), 378 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2024-10-29 16:17:23 +0000

github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
github-actions bot pushed a commit that referenced this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace use of rowSums() to create summary columns in tidyr episode
1 participant