README.md 2.78 KB
Newer Older
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
1 2 3 4 5 6 7 8
# Upward Bound 2020 Public Health R Package

## General Information
This repository contains information on UBQR2020 R Package. 
This R package contains materials used for my Upward Bound Public Health course.
It contains learnr tutorials for my students to complete and submit.
It contains data for my students to conduct data analysis projects.

Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
9 10 11 12 13 14 15 16
## learnr Tutorials

- Introduction to R (Intro_R)
- Biostatistics (Biostats)
- SIR Models (Sir_Models)
- Environmental Health (Environmental_Health)
- Health Disparities (Health_Disparities)

Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
17 18 19 20 21 22
## Install R Package

To install the package, use the following code:
```
#install.packages("devtools")
#Intsall R Package
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
23
devtools::install_gitlab("inqs909/UBQR2020")
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
24 25 26
```
Make sure to install the devtools package first.

Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
27
## Access learnr tutorial
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
28

Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
29
To access one of my learnr tutorials, use the `access_tutorial()` function. It only needs the name of the tutorial.
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
30 31 32

```
library(UBQR2020)
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
33
access_tutorial("Intro_R")
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
34
```
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
35 36 37 38 39 40 41 42

## Access CSV File

My learnr tutorials record a student's activity and saves it in a CSV file. Students can turn in this CSV file as there submission. To retrieve the file, use the `getting_work()` function. It will obtain the file and save your file in the working directory and named as "YOUR_NAME-INTRO_R-Submission.csv". This function needs the name of the tutorial and your name to work.

```
getting_work("Intro_R","YOUR_NAME")
```
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

## R Package Information

This package is designed to provide my Upward Bound students with a tutorial on different topics and get an idea about programming in R. Therefore, there are 3 built-in functions designed to help students access the tutorial, record their answers and have obtain a csv file to submit for grading. The functions are the `access_tutorial()`, `getting_work()`, and `writing_tutorial()` functions.

### access_tutorial()

To access one of my learnr tutorials, use the `access_tutorial()` function. It only needs the name of the tutorial.

```
library(UBQR2020)
access_tutorial("Intro_R")
```

### getting_work()

My learnr tutorials record a student's activity and saves it in a CSV file. Students can turn in this CSV file as there submission. To retrieve the file, use the `getting_work()` function. It will obtain the file and save your file in the working directory and named as "YOUR_NAME-INTRO_R-Submission.csv". This function needs the name of the tutorial and your name to work.

```
getting_work("Intro_R","YOUR_NAME")
```

### writing_tutorial()

Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
67
The `writing_tutorial()` function is used to record a students progress. As the student progresses from the learnr tutorial, it will record an action is committed. The action is then saved in a CSV file that a student can later obtain using the `getting_work()` function. The `writiing_tutorial()` is placed at the beginning of an Rmd file to record a students' work.
Isaac Quintanilla Salinas's avatar
Isaac Quintanilla Salinas committed
68