You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Straight forward exploration of the basic characteristics of the data set (variables, range, number of columns resp. rows etc.). See below for suggestions on doing the life expectancy calculation for 1952
Presentation: graphs
✔️
No graphs in the R code but creative use of graphs in the readme file
Presentation: tables
✔️
No tables in the R code but creative use of lists in the readme file
Achievement, creativity
✔️
Nice work on the readme file
Ease of access
✔️
Everything worked
Suggestions
The following code chunk is just another version of calculating the mean life expectancy in 1952. Compared to your strategy, it needs no 'post-processing' of the output (e.g., changing the names of columns etc.).
require(dplyr)
gapminder %>%
filter(year == 1952) %>%
group_by(continent, year) %>%
summarise(meanLifeExp = mean(lifeExp),
sumPop = sum(pop),
meanGDPPercap = mean(gdpPercap))
# here you can specify what should be done with each variables for the summary
# (e.g., you might want to take the mean for the life expectancy but take the sum
# of the population of every country)
# A tibble: 5 x 5
# Groups: continent [?]
continent year meanLifeExp sumPop meanGDPPercap
<fct> <int> <dbl> <dbl> <dbl>
1 Africa 1952 39.1 4570010. 1253.
2 Americas 1952 53.3 13806098. 4079.
3 Asia 1952 46.3 42283556. 5195.
4 Europe 1952 64.4 13937362. 5661.
5 Oceania 1952 69.3 5343003 10298.
Cheers, Reto
The text was updated successfully, but these errors were encountered:
Suggestions
The following code chunk is just another version of calculating the mean life expectancy in 1952. Compared to your strategy, it needs no 'post-processing' of the output (e.g., changing the names of columns etc.).
Cheers, Reto
The text was updated successfully, but these errors were encountered: