MTH-391D | Spring 2025 | University of Portland
January 22, 2025
R Script File Example
Running R Commands in Different Ways
What is RMarkdown?
Why use RMarkdown?
.Rmd
and .html
formats.
This ensures that your work is detailed, well-organized, and clearly
presented.What does RMarkdown look like in R Studio?
RMarkdown Viewed in R Studio
RMarkdown Basic Parts 1, 2, & 3
---
”. This header is
required and the information that it contains can affect the entire
output.RMarkdown Basic Parts 4 & 5
```
”.Creating an R Code Chunk
Running Code Chunks
\(\star\) Understanding this difference is key for fixing majority of errors and undesired outputs.
Why learn any of these things?
In-class activities and mini-assignments must be submitted either
physically or through Moodle. Depending on the lesson, submission format
will be in physical form, .pdf
, .Rmd
, or
.html
.
All project phase reports must be submitted in both .Rmd
and .html
files through Moodle.
\(\star\) Mini-assignments and the Project will have special R Studio spaces.
How can I be successful in this class?
\(\star\) Help hours –walk-in and by appointment– exists!
The purpose of this activity is for you to get a sense of how mini-assignments and the project are done.
Log-in to Posit Cloud and open the R Studio assignment MA2: Modify a RMarkdown Document.
Make sure you are in the current working directory. Rename the
.Rmd
file by replacing [name]
with your name
using the format [First name][Last initial]
. Then, open the
.Rmd
file.
Change the author in the YAML header.
Read the provided instructions.
Answer all exercise problems on the designated sections.