Skip to content

Commit

Permalink
differences for PR #891
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 16, 2024
1 parent 4bcd353 commit 2ff9464
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 1,152 deletions.
2 changes: 1 addition & 1 deletion 01-rstudio-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ function (name, pos = -1L, envir = as.environment(pos), all.names = FALSE,
}
else all.names
}
<bytecode: 0x55c789de4918>
<bytecode: 0x5582676ebdb0>
<environment: namespace:base>
```

Expand Down
2 changes: 1 addition & 1 deletion 02-project-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ ls -lh data/gapminder_data.csv
```

```output
-rw-r--r-- 1 runner docker 80K May 12 15:14 data/gapminder_data.csv
-rw-r--r-- 1 runner docker 80K May 16 13:25 data/gapminder_data.csv
```

The file size is 80K.
Expand Down
6 changes: 3 additions & 3 deletions 03-seeking-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ sessionInfo()
```

```output
R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS
Matrix products: default
Expand All @@ -181,7 +181,7 @@ attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.3.3 tools_4.3.3 yaml_2.3.8 knitr_1.46 xfun_0.43
[1] compiler_4.4.0 tools_4.4.0 yaml_2.3.8 knitr_1.46 xfun_0.43
[6] renv_1.0.7 evaluate_0.23
```

Expand Down
17 changes: 11 additions & 6 deletions 12-dplyr.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,14 @@ lifeExp_bycountry %>%

:::::::::::::::::::::::::

The function `group_by()` allows us to group by multiple variables. Let's group by `year` and `continent`.
The function `group_by()` allows us to group by multiple variables. If you don't `ungroup()` after summarizing with multiple grouping variables, you may get a warning telling you the data are still partially grouped. Let's group by `year` and `continent`.


```r
gdp_bycontinents_byyear <- gapminder %>%
group_by(continent, year) %>%
summarize(mean_gdpPercap = mean(gdpPercap))
summarize(mean_gdpPercap = mean(gdpPercap)) %>%
ungroup()
```

```output
Expand All @@ -410,7 +411,8 @@ gdp_pop_bycontinents_byyear <- gapminder %>%
summarize(mean_gdpPercap = mean(gdpPercap),
sd_gdpPercap = sd(gdpPercap),
mean_pop = mean(pop),
sd_pop = sd(pop))
sd_pop = sd(pop)) %>%
ungroup()
```

```output
Expand Down Expand Up @@ -503,7 +505,8 @@ gdp_pop_bycontinents_byyear <- gapminder %>%
mean_pop = mean(pop),
sd_pop = sd(pop),
mean_gdp_billion = mean(gdp_billion),
sd_gdp_billion = sd(gdp_billion))
sd_gdp_billion = sd(gdp_billion)) %>%
ungroup()
```

```output
Expand All @@ -530,7 +533,8 @@ gdp_pop_bycontinents_byyear_above25 <- gapminder %>%
mean_pop = mean(pop),
sd_pop = sd(pop),
mean_gdp_billion = mean(gdp_billion),
sd_gdp_billion = sd(gdp_billion))
sd_gdp_billion = sd(gdp_billion)) %>%
ungroup()
```

```output
Expand All @@ -545,7 +549,8 @@ gdp_future_bycontinents_byyear_high_lifeExp <- gapminder %>%
mutate(gdp_futureExpectation = ifelse(lifeExp > 40, gdpPercap * 1.5, gdpPercap)) %>%
group_by(continent, year) %>%
summarize(mean_gdpPercap = mean(gdpPercap),
mean_gdpPercap_expected = mean(gdp_futureExpectation))
mean_gdpPercap_expected = mean(gdp_futureExpectation)) %>%
ungroup()
```

```output
Expand Down
95 changes: 0 additions & 95 deletions config.yaml

This file was deleted.

Empty file modified fig/06-rmd-generate-figures.sh
100755 → 100644
Empty file.
Empty file modified fig/12-plyr-generate-figures.sh
100755 → 100644
Empty file.
50 changes: 25 additions & 25 deletions md5sum.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
"file" "checksum" "built" "date"
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2024-05-12"
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-05-12"
"config.yaml" "8b9d63dd3c46d5b4d5fa4219b51a0dfc" "site/built/config.yaml" "2024-05-12"
"index.md" "86c8fb559b13d1695d55b52dd6cbf574" "site/built/index.md" "2024-05-12"
"episodes/01-rstudio-intro.Rmd" "04f6b758558750cef962768d78dd63b0" "site/built/01-rstudio-intro.md" "2024-05-12"
"episodes/02-project-intro.Rmd" "cd60cc3116d4f6be92f03f5cc51bcc3b" "site/built/02-project-intro.md" "2024-05-12"
"episodes/03-seeking-help.Rmd" "d24c310b8f36930e70379458f3c93461" "site/built/03-seeking-help.md" "2024-05-12"
"episodes/04-data-structures-part1.Rmd" "5ec938f71a9cec633cef9329d214c3a0" "site/built/04-data-structures-part1.md" "2024-05-12"
"episodes/05-data-structures-part2.Rmd" "95c5dd30b8288090ce89ecbf2d3072bd" "site/built/05-data-structures-part2.md" "2024-05-12"
"episodes/06-data-subsetting.Rmd" "5d4ce8731ab37ddea81874d63ae1ce86" "site/built/06-data-subsetting.md" "2024-05-12"
"episodes/07-control-flow.Rmd" "6a8691c8668737e4202f49b52aeb8ac6" "site/built/07-control-flow.md" "2024-05-12"
"episodes/08-plot-ggplot2.Rmd" "a9a97a1eee46dc82b83c6c740a4412cf" "site/built/08-plot-ggplot2.md" "2024-05-12"
"episodes/09-vectorization.Rmd" "e229eb061b3f072a132c4b31bbc2fdb0" "site/built/09-vectorization.md" "2024-05-12"
"episodes/10-functions.Rmd" "14edd4cf50edb8fefeb987a17d740e1a" "site/built/10-functions.md" "2024-05-12"
"episodes/11-writing-data.Rmd" "8b26e062dddd2394d00c6847ff0b7505" "site/built/11-writing-data.md" "2024-05-12"
"episodes/12-dplyr.Rmd" "fc20e35f891f0bb624647d69816c3220" "site/built/12-dplyr.md" "2024-05-12"
"episodes/13-tidyr.Rmd" "1c59c3bea4cec5e0c47654a546294f07" "site/built/13-tidyr.md" "2024-05-12"
"episodes/14-knitr-markdown.Rmd" "0c63ce92263a32f19fbec9f7b619b682" "site/built/14-knitr-markdown.md" "2024-05-12"
"episodes/15-wrap-up.Rmd" "c5ce0d34a37b7a99624ad1d6ac482256" "site/built/15-wrap-up.md" "2024-05-12"
"instructors/instructor-notes.md" "e61e7587564a6c4c11dbb6beea127764" "site/built/instructor-notes.md" "2024-05-12"
"learners/discuss.md" "42ad66ab1907e030914dbb2a94376a47" "site/built/discuss.md" "2024-05-12"
"learners/reference.md" "1cd851cc85adc26ea172da91e8c564f7" "site/built/reference.md" "2024-05-12"
"learners/setup.md" "f888f8a54b071715c0cf56896e650c00" "site/built/setup.md" "2024-05-12"
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2024-05-12"
"renv/profiles/lesson-requirements/renv.lock" "a1ea73c0f46232383431e5531d0bb733" "site/built/renv.lock" "2024-05-12"
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2024-05-16"
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-05-16"
"config.yaml" "8b9d63dd3c46d5b4d5fa4219b51a0dfc" "site/built/config.yaml" "2024-05-16"
"index.md" "86c8fb559b13d1695d55b52dd6cbf574" "site/built/index.md" "2024-05-16"
"episodes/01-rstudio-intro.Rmd" "04f6b758558750cef962768d78dd63b0" "site/built/01-rstudio-intro.md" "2024-05-16"
"episodes/02-project-intro.Rmd" "cd60cc3116d4f6be92f03f5cc51bcc3b" "site/built/02-project-intro.md" "2024-05-16"
"episodes/03-seeking-help.Rmd" "d24c310b8f36930e70379458f3c93461" "site/built/03-seeking-help.md" "2024-05-16"
"episodes/04-data-structures-part1.Rmd" "5ec938f71a9cec633cef9329d214c3a0" "site/built/04-data-structures-part1.md" "2024-05-16"
"episodes/05-data-structures-part2.Rmd" "95c5dd30b8288090ce89ecbf2d3072bd" "site/built/05-data-structures-part2.md" "2024-05-16"
"episodes/06-data-subsetting.Rmd" "5d4ce8731ab37ddea81874d63ae1ce86" "site/built/06-data-subsetting.md" "2024-05-16"
"episodes/07-control-flow.Rmd" "6a8691c8668737e4202f49b52aeb8ac6" "site/built/07-control-flow.md" "2024-05-16"
"episodes/08-plot-ggplot2.Rmd" "a9a97a1eee46dc82b83c6c740a4412cf" "site/built/08-plot-ggplot2.md" "2024-05-16"
"episodes/09-vectorization.Rmd" "e229eb061b3f072a132c4b31bbc2fdb0" "site/built/09-vectorization.md" "2024-05-16"
"episodes/10-functions.Rmd" "14edd4cf50edb8fefeb987a17d740e1a" "site/built/10-functions.md" "2024-05-16"
"episodes/11-writing-data.Rmd" "8b26e062dddd2394d00c6847ff0b7505" "site/built/11-writing-data.md" "2024-05-16"
"episodes/12-dplyr.Rmd" "cb2a650536ad6720a836884bd0fe49e3" "site/built/12-dplyr.md" "2024-05-16"
"episodes/13-tidyr.Rmd" "1c59c3bea4cec5e0c47654a546294f07" "site/built/13-tidyr.md" "2024-05-16"
"episodes/14-knitr-markdown.Rmd" "0c63ce92263a32f19fbec9f7b619b682" "site/built/14-knitr-markdown.md" "2024-05-16"
"episodes/15-wrap-up.Rmd" "c5ce0d34a37b7a99624ad1d6ac482256" "site/built/15-wrap-up.md" "2024-05-16"
"instructors/instructor-notes.md" "e61e7587564a6c4c11dbb6beea127764" "site/built/instructor-notes.md" "2024-05-16"
"learners/discuss.md" "42ad66ab1907e030914dbb2a94376a47" "site/built/discuss.md" "2024-05-16"
"learners/reference.md" "1cd851cc85adc26ea172da91e8c564f7" "site/built/reference.md" "2024-05-16"
"learners/setup.md" "f888f8a54b071715c0cf56896e650c00" "site/built/setup.md" "2024-05-16"
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2024-05-16"
"renv/profiles/lesson-requirements/renv.lock" "467b13ee736b5e026c6bd1e9ae36dbc8" "site/built/renv.lock" "2024-05-16"
Loading

0 comments on commit 2ff9464

Please sign in to comment.