Choose “File → New Project… → New Directory → New Project” from the menu.
Type a name for your new directory, and choose a directory on your local or network drive.
OK.
Close and reopen RStudio. Double-check that the project is still active.
Type and run getwd()
in the console, double-check that the output matches the path to your newly created directory.
Open the project you started with today by selecting it from the project dropdown in the top right corner of the RStudio IDE window. (Alternatively, close the RStudio IDE and double-click the R-workshop.Rproj
file.)
Restart the R session (via “Session → Restart R” or via via Ctrl + Shift + F10, on the Mac: Cmd + Shift + F10).
Hint: The keyboard shortcut may not work in rstudio.cloud.
Source the script you have edited last. Remember the first line of each script should be library(tidyverse)
.
Hint: The keyboard shortcut may not work in rstudio.cloud.
Choose “File → Knit document” to render the entire output to a single document.
Everything after #
is a comment. Add a regular comment and one prefixed with #'
(hash apostroph). Knit the document. Can you see the difference?
View the mpg
dataset with View(mpg)
. Experiment with the data viewer.
Copyright © 2018 Kirill Müller. Licensed under CC BY-NC 4.0.