This repository has been archived by the owner on Feb 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathversion_control_training.Rmd
73 lines (38 loc) · 2.24 KB
/
version_control_training.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
title: "Version Control Training"
author: "Ghislain Nono Gueye, Ph.D."
date: ""
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## The Project
Develop a suite of functions (i.e. a package) that will help professors in their class-management tasks (e.g. computing grades, visualizing class performance, ...).
## Guidelines
- The **activities** below will make you produce new code and, in many cases, alter it.
- If you come up with ideas to improve the code in ways that are not specified in the instructions, feel free to do it and commit your changes.
- Push your local repo to Github at the end of each activity.
## Activity 1 (learning goals: local repository, remote repository, commit, push, diff)
- Create a function which assigns a letter grade based on a numeric grade (`assign_letter_grade()`).
- the first version of the function should use `if()`
- the second version of the function should use `cut()`
- the final version of the function should use `dplyr::case_when()`
- Push your local repository to Github.
- Visualize the **diffs** between your commits.
## Activity 2 (same learning goals as activity 1)
- Create a function to impute `NA` values.
- The first version of the function should be on a single vector such that it has to be used with several `mutate()` functions.
- The second version of the function should used a scoped version of `mutate()` (i.e. `mutate_*()`).
- Push your local repository to Github.
- Visualize the **diffs** between your commits.
## Activity 3 (learning goals: branch, pull request, merge)
- Create a function which computes weight averages (`compute_weighted_average()`).
- The first version of the function should use a pure base `R` approach (with (a1+a2+a3)/3).
- A collaborator on the project must fork the project improve on it and send a **pull request**. Improvements must make use of `rowMeans()`.
- The owner of the master branch must analyze the code and merge it.
## Activity 4 (learning goals: branch, pull request, merge)
- Create a function to drop the lowest n scores in a group of evaluations (`drop_n()`).
- Version 1: Make use of `apply(..., 1, ....)
- Version 2: Make use of `transpose()` and `pmap()`.
- Version 2: