Introducing R Studio
Preface - Chapter 1

Today’s goals


  1. Change the yaml heading on a document
  2. Create your first code chunk!
  3. Learn the code chunk settings
  4. Assign values to a variable

Artwork by @allison_horst

Agenda

  • Complete today’s activity first!

  • These slides just include helpful reminders that you may find useful to refer back to when working on later activities.

RStudio interface

code and text for report go here

stored variables and data shows up here

your working directory project files are here

CONSOLE PANE one time code that does not appear in document can go here

Useful Buttons

Change view output settings

Export html to submit

Useful code chunk settings

``` {{r}}
#| message: false
#| warning: false
#| eval: false
#| echo: false
#| include: false
```
  • message: false prevents messages from appearing in knitted doc
  • warning: false prevents warnings from appearing in knitted doc
  • eval: false includes the code chunk in the knitted document but prevents the code chunk from being run
  • echo: false prevents code itself from printing but includes the results of the code
  • include: false prevents code and its results from printing but still runs the code when knitted