Duration: ~10 Minutes
File -> New Project -> New Directory
Create an empty project
Name your project
R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> getwd()
[1] "/home/abby/foo"
Locate your new folder.
foo.Rproj
is an RStudio file.
# Author: 'your name'
# Date: 'today'
# Purpose: example template
## Load some data
data(cars)
## Look at it
str(cars)
## Play with it
colMeans(cars)
Save as my_cars.R
. What happens?
Root Project Folder (foo):
Document everything.
README.md
is a naming convention.We will cover Markdown in a future workshop.
For now, use plain text.
... simplify your life
Install and load with
# plural; package name in quotes
install.packages("tidyverse")
# singular; quotes not needed
library(tidyverse)