datacarpentry / r-socialsci

R for Social Scientists
https://datacarpentry.org/r-socialsci/
Other
111 stars 199 forks source link

fix the summary table for mean items #493

Closed bbartholdy closed 10 months ago

bbartholdy commented 10 months ago

While working on #470 I noticed that there was a mistake in the summary table in https://github.com/datacarpentry/r-socialsci/blob/c479d9374cfe42903129240ce7eee878b85e6e6c/episodes/04-tidyr.Rmd#L386C1-L386C1

It was assumed that no_listed_items was at the end of the items variables and could be excluded by taking the mean of columns bicycle:car. It seems that it is located somewhere in between bicycle and car, so the mean, which was supposed to count all items except no_listed_items, is actually the mean including no_listed_items.

This adds the line select(-no_listed_items) to explicitly ensure that no_listed_items is not included in the mean.

github-actions[bot] commented 10 months ago

Thank you!

Thank you for your pull request :smiley:

:robot: 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:

Rendered Changes

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

The following changes were observed in the rendered markdown documents:

 04-tidyr.md | 27 ++++++++++++++-------------
 md5sum.txt  |  2 +-
 2 files changed, 15 insertions(+), 14 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.

:stopwatch: Updated at 2023-11-06 12:30:53 +0000