Difference between revisions of "Workshops/Saskatoon 2015-Introduction to R"
m (→Schedule) |
m (→Module 1) |
||
Line 69: | Line 69: | ||
| | ||
− | == | + | ==Setup== |
+ | <div style="padding: 5px; border: solid 1px #000000; background-color: #DDDDDD;font-size: 85%"> | ||
+ | There may be a difference between '''R''' and R Studio regarding the location of installed packages. | ||
− | ; | + | We have noticed at previous workshops that RStudio couldn't find libraries that were not installed through the RStudio package manager. This appeared to have been version dependent, and may not affect current releases. You can check for this (in case you have problems running the {{C|library()}} command) by issuing the command ... |
+ | |||
+ | <source lang="R"> | ||
+ | .libPaths() | ||
+ | </source> | ||
+ | |||
+ | ...in '''R''' as well as in R Studio. The path should be the same in both. | ||
+ | |||
+ | In case you need to "tell" RStudio the location, you can define the path in a startup file. Create or edit a file called <code>.Renviron</code> in your home directory. Inside there define: | ||
+ | |||
+ | <source lang="R"> | ||
+ | R_LIBS=<Library Path of R installed packages> | ||
+ | </source> | ||
+ | |||
+ | Alternatively, you could use the R Studio package manger to install libraries. | ||
+ | </div> | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | {{task| | ||
+ | # Download the file below to your working directory; | ||
+ | # load the file in R Studio; | ||
+ | # proceed to the first {{C|CHECKPOINT}} in the script. | ||
+ | |||
+ | [[Media:R_Intro_Module_1_First_steps.R|R_Intro_Module_1_First_steps.R]] | ||
+ | |||
+ | }} | ||
+ | |||
+ | |||
+ | |||
+ | ==First steps== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;Script files for this section | ||
*[[Media:ScriptTemplate.R|ScriptTemplate.R]] | *[[Media:ScriptTemplate.R|ScriptTemplate.R]] | ||
*[[Media:Utilities.R|Utilities.R]] | *[[Media:Utilities.R|Utilities.R]] |
Revision as of 16:17, 18 August 2015
Introduction to R
Contents
Schedule
Please note: this schedule is a rough guideline only, we will be very flexible to adapt to class needs as we proceed.
Time | Wednesday's Activities |
09:00 – 10:30 | Welcome, Introduction Lecture and practicals: setup and environment |
10:30 – 11:00 | Coffee break |
11:00 – 12:30 | Lecture and practicals: R commands |
12:30 – 13:30 | Lunch break |
13:30 – 15:00 | Lecture and practicals: programming |
15:00 – 15:30 | Coffee break |
13:30 – 15:00 | Lecture and practicals: data |
Setup
There may be a difference between R and R Studio regarding the location of installed packages.
We have noticed at previous workshops that RStudio couldn't find libraries that were not installed through the RStudio package manager. This appeared to have been version dependent, and may not affect current releases. You can check for this (in case you have problems running the library()
command) by issuing the command ...
.libPaths()
...in R as well as in R Studio. The path should be the same in both.
In case you need to "tell" RStudio the location, you can define the path in a startup file. Create or edit a file called .Renviron
in your home directory. Inside there define:
R_LIBS=<Library Path of R installed packages>
Alternatively, you could use the R Studio package manger to install libraries.
Task:
- Download the file below to your working directory;
- load the file in R Studio;
- proceed to the first
CHECKPOINT
in the script.
R_Intro_Module_1_First_steps.R
First steps
- Script files for this section
Notes