This repository contains information on s170R R Package. It contains learnr tutorials for my students to complete. The package will install the learnr and the tidyverse package as well. RStudio is required to run the tutorials. You can download the latest version of RStudio here. Additionally, the package will install tinytex to install a local LaTeX distribution on your computer.
If there are any questions or there are any errors in the tutorial, please feel free to email me.
To install the package, use the following code:
#install.packages("devtools")
#Intsall R Package
devtools::install_gitlab("inqs909/s170R")Make sure to install the devtools package first.
You will need to install rtools to allow the devtools package to install packages from a remote repository: https://cran.r-project.org/bin/windows/Rtools/.
Make sure to update R as well.
There is an RMD template available for you to use for your homework assignment. When you create a new RMD File, you can choose “HW” from the template section to create it. The template contains basic formatting and instruction to install a LaTeX distribution with tinytex. However, I do recommend installing LaTeX website and install the distribution you need: Windows, Mac, or Linux (Debian or RHEL).
This package contains a learnr tutorials that can be used to learn about different statistical topics. View the vignette on tutorials to get more information. Go to the articles section of the website to find the page.
To access one of my learnr tutorials, use the access_tutorial() function. It only needs the name (id) of the tutorial.
library(s170R)
access_tutorial("R_Basics")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.
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")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.