- Date: Wednesday, July 10, 2019
- Time: 10:00 AM - 12:00 PM
- Location: Olson Hall 207
- Bradley McDonnell, University of Hawai‘i at Mānoa ([email protected])
- Bradley Rentz, University of Hawai‘i at Mānoa ([email protected])
Participants will be required to bring laptop computers to the workshop running OS-X (Mac) or Windows (mobile systems such as iPads, Android tablets, and Chromebooks are not suitable for the workshop). Prior to the workshop, please follow these instructions for installing all of the necessary software, which include R, R Studio, and (optionally) LaTeX.
These slides summarize the basics of dynamic documents with R Markdown. For a fuller discussion, see Yui Xie's description of knitr. Also, see below for several helpful links.
These exercises contain some sample data from a typological study, a phonetics study, and a study of language attitudes. The exercises purposely use rather simple R code. The goal of the exercises is for you to feel comfortable using dynamic documents with knitr
with R Markdown or LaTeX.
There are two ways to download the materials for the exercises in class:
-
If you are familiar with git and GitHub, you can simply clone this repo in R Studio.
-
If option 1 does not make sense to you, follow the following steps:
- Click the green button above.
- Then, click Download Zip.
- Unzip the file and save the folder "2019-lsa-dynamic-docs-master" in an easy-to-find location.
- Open the file "2019-lsa-dynamic-docs.Rproj" by clicking it or in R Studio selecting "File > Open Project..." and navigating to "2019-lsa-dynamic-docs.Rproj".
- Click the green button above.
install.packages("tidyverse", "knitr", "kableExtra", "leaflet", "wesanderson","sjPlot","h2o","iml","summarytools")
*If you'd like a more information to reference have a look at The Definitive Guide to R Markdown
*If you're feeling a bit confused or intimadated by all of this, feel free to take some time to look over this very gentle introduction to R Markdown or this other short introduction
This is a very basic exercise to get you familiar with R Markdown.
This is a very basic example of slides using knitr
and R Markdown. First, use the knit
command to compile the document. Then, read through the document and look out for commented sections in between <!-- and -->. For each of these, we list different tasks to complete throughout the document. We'll be walking around to help you complete these tasks.
This is a basic example of a dynamic document. First, use the knit
command to compile the document. Then, read through the document and look out for commented sections in between <!-- and -->. For each of these, we list different tasks to complete throughout the document. We'll be walking around to help you complete these tasks.
This is a more advanced example of a dynamic document. We'll be walking around to help you complete these tasks.
This material is based upon work supported by the National Science Foundation under grant SMA-1745249 to the University of Hawai‘i at Mānoa. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.