https://github.com/brunj7/rmarkdown-intro
Introduction to R Markdown
https://github.com/brunj7/rmarkdown-intro
data-science reproducible-science rmarkdown training-materials
Last synced: 4 months ago
JSON representation
Introduction to R Markdown
- Host: GitHub
- URL: https://github.com/brunj7/rmarkdown-intro
- Owner: brunj7
- Created: 2018-10-05T21:02:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-18T19:27:30.000Z (about 6 years ago)
- Last Synced: 2025-04-08T16:14:18.858Z (about 1 year ago)
- Topics: data-science, reproducible-science, rmarkdown, training-materials
- Language: TeX
- Homepage: https://brunj7.github.io/rmarkdown-intro/rmarkdown-intro_deck.html
- Size: 8.95 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction to `rmarkdown`
This is a 1h-1h30 workshop given at UCSB ([Eco-Data-Science Group](https://eco-data-science.github.io/) and [Center for Scientific Computing (CSC)](http://csc.cnsi.ucsb.edu/docs/seminars-workshops))
There are 2 main documents:
- Presentation deck: https://brunj7.github.io/rmarkdown-intro/rmarkdown-intro_deck.html
- R Markdown document we will be playing with: [rmarkdown-myfirst.Rmd](rmarkdown-myfirst.Rmd)
## Preparing the workshop
### Required software
We will primarily be using a web browser, `R`, `RStudio`. Please be sure these are all installed on your laptop, as follows:
- **R:** We will use the lastest R version, which you can download and install from [CRAN](https://cran.rstudio.com)
- **RStudio**: RStudio is an excellent front-end (IDE) for R with integrated graphics and coding tools and is recommended (read: required) for this course. It is free and available for both Windows, Mac OS X and Linux.
To download RStudio, visit [RStudio's download page](https://www.rstudio.com/products/rstudio/download/).
*If you don't know how up to date your version of RStudio is, please download a recent version and install it*
- **R packages:** Please be sure you have installed or updated the following packages:
- `remotes` (not needed, if you have `devtools` already installed)
- `knitr`
- `rmarkdown`
- `bookdown`
- `DT`
- `tidyverse`
- `leaflet`
- `captioner`
#### There are several ways to install a R package:
- In the R console, type: `install.packages("package-name")` Note that R is **case sensitive**, and that the **package name should be in quotes**.
- In RStudio, click on the "Packages" tab in the bottom right quadrant of the interface, click Install, type the package name and click Istall _or_ click Tools => Install Packages, type the package name and click Install
- In R for Windows clients, go to the Packages menu => Install package(s).
- In R for MacOS X clients, go to the Package & Data menu and click on Package Installer => CRAN (binaries) => Get list. Click on the box “install dependencies” in order to automatically install other necessary libraries while installing your R libraries.
In our case, you could type at the R console:
```r
workshop_pkg <- c("remotes", "knitr", "rmarkdown", "bookdown", "DT", "tidyverse", "leaflet", "captioner")
install.packages(workshop_pkg)
```
#### PDF rendering
If you want to generate PDF output from Markdown (we will mainly focus on html files), you will need to install LaTeX. For R Markdown users who have not installed LaTeX before, we recommend to follow the recommendations of [Xie et al, 2018] and that you install `TinyTeX` (https://yihui.name/tinytex/):
```r
install.packages("tinytex")
tinytex::install_tinytex() # install TinyTeX
```