RPR-Setup
Setup R to work with it
Keywords: R projects; working with git version control via RStudio; the history mechanism and why not to use it; .Rprofile to customize startup behaviour; the working directory
Contents
This unit is under development. There is some contents here but it is incomplete and/or may change significantly: links may lead to nowhere, the contents is likely going to be rearranged, and objectives, deliverables etc. may be incomplete or missing. Do not work with this material until it is updated to "live" status.
Abstract
...
This unit ...
Prerequisites
You need to complete the following units before beginning this one:
Objectives
...
Outcomes
...
Deliverables
- Time management: Before you begin, estimate how long it will take you to complete this unit. Then, record in your course journal: the number of hours you estimated, the number of hours you worked on the unit, and the amount of time that passed between start and completion of this unit.
- Journal: Document your progress in your course journal.
- Insights: If you find something particularly noteworthy about this unit, make a note in your insights! page.
Evaluation
Evaluation: NA
- This unit is not evaluated for course marks.
Contents
"Projects"
We will make extensive use of "projects" in class. Read more about projects in RStudio here.
Git Version control
We will also make extensive use of version control. In fact, we will now load a project via Git version control from its free, public repository on GitHub.
Task:
- Read more about Version Control in RStudio here.
- Follow the instructions to install
git
on your computer.
Then do the following:
- open RStudio
- Select File → NewProject...
- Click on Version Control
- Click on Git
- Enter
https://github.com/hyginn/R_Exercise-BasicSetup
as the Repository URL. - Type a
<tab>
character, the Project directory name field should then autofill to readR_Exercise-BasicSetup
- Click on Browse... to find your project directory. (The one that you have created above). Click Open.
- Click Create Project; the project files should be downloaded and the console should prompt you to type
init()
to begin. - Type
init()
into the console pane.
An R script should load.
- Explore the script and follow its instructions.
What could possibly go wrong?...
- ↑ The Terminal app is in the Utilities sub-folder of your Applications folder.