Skip to content

Commit

Permalink
Merge pull request #116 from ARTbio/IOC_R_exo_fix
Browse files Browse the repository at this point in the history
Make questions easier to understand for week6
  • Loading branch information
Ning-L authored Mar 27, 2024
2 parents 8e7d378 + 57606a0 commit f04204a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions docs/R-IOC/07_IOC_R_week_06.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,29 @@ and sometimes even more intuitive. On your marks, get set, go to the section [ti

## Let's Practice

For each week, you'll have a set of exercises that you must render in an R script.
For each week, you'll have a set of exercises that you must render in an automatic rapport.
After that you need to complete the following google form to answer some MCQ (Multiple
Choice Questions) where the final question is to deposit your R script.
Please note that an Rscript has the extension `.R` but it's not supported by Google Form.
To avoid this inconvenience, you need to add the `.txt` extension to make your file named as: `NAME_week6_script.R.txt`.
Choice Questions) where the final question is to deposit your RMD/QMD.
Please note that an Rscript has the extension `.Rmd`/`.qmd` but it's not supported by Google Form.
To avoid this inconvenience, you need to add the `.txt` extension to make your file named as: `NAME_week6_script.Rmd.txt`.

![](images/toolbox-do-it-yourself.png){: style="width:75px"} **Do it yourself!**

- [x] 1. Create a tibble `my_phones` from the available data.frame `WorldPhones`. Beware of the rownames ! We don't want to lose them
- [x] 2. Make it tidy and write it in `my_phones`
- [x] 3. Filter the tibble to retrieve only the European (don't write it in `myphones`).
- [x] 4. Select the tibble to retrieve only the region (don't write it in `myphones`).
- [x] 5. Replace "." by underscore in region name
- [x] 6. Replace truncated region names (`Amer`) by the full continent name using stringr's pattern matching functions.
- [x] 3. Filter the tibble to retrieve only the European (don't write it in `my_phones`).
- [x] 4. Select the tibble to retrieve only the column that contains region names (don't write it in `my_phones`).
- [x] 5. Replace "." by an underscore in region name
- [x] 6. Replace truncated region names (like `Amer`) by the full continent name using stringr's pattern matching functions.
- [x] 7. Group the data based on the region
- [x] 8. Compute the mean of number of telephones per region
- [x] 9. Add a column with a normalized number of telephone per region (Reminder : `norm_val = val - mean(val) / sd(val)`)
- [x] 10. Resume the information to check if the mean equal 0 and the sd equal 1. What do you get ?
- [x] 11. Do the same for the last 4 questions but by grouping on the year you can change the created column names
- [x] 11. Do the same for the last 4 questions (from Q7 to 10) but by grouping on the year you can change the created column names
- [x] 12. Resume the information to retrieve the Year with the most phones for each region

Please be aware of the best practices for your Rscript, we will be attentive to them!
Please be aware of the best practices for your Rmarkdown or quarto document, we will be
attentive to them!

Now you can fill the following quiz: [Quiz of week 6](https://forms.gle/aNvCqoyqZbajxtZQ9).

Expand Down

0 comments on commit f04204a

Please sign in to comment.