4.2 Interactive Tutorial 1
1. List of R commands covered this week
Function | Package |
---|---|
data | utils |
View | utils |
write.csv | utils |
read.csv | utils |
head | utils |
class | base |
lapply | base |
as.character | base |
read_csv | readr |
read_population | gstudio |
df2genind | adegenet |
dim | base |
2. General Instructions
a) How to access tutorials
Through RStudio Add-in:
- Install course Addins in RStudio:
- the LandGenCourse package must be installed
- instructions and video are available on [Github] (https://github.com/hhwagner1/LandGenCourse)
- type:
library(LandGenCourse)
- In RStudio, click on
Addins
(top menu bar) and select2. Start Tutorial
- alternatively you can type:
LandGenCourse:::startTutorialAddin()
- video instructions are [available] (https://www.dropbox.com/s/598kwim7x09m47t/Intro_LandGenCourse_small.mp4?dl=0)
- alternatively you can type:
- Following the
To start a tutorial
instructions that pop up in the Console:- type:
require(swirl)
- type:
swirl()
- follow prompts
- select course (“Landscape_Genetics_R_Course”) and tutorial (Weeks 1 - 8)
- note: some users will require updates to packages and to restart this process before proceeding
- type:
b) How to complete tutorial
Follow prompts in the RStudio Console.
To stop and resume a tutorial:
- to stop and exit swirl, type:
bye()
- to resume where you stopped, type:
swirl()
To restart tutorial from beginning:
- type:
swirl()
- use a different name (simply add a number, like this: ‘MyName2’)
c) How to submit answers (participating institutions only)
The last prompt will ask whether you would like to submit the log of your tutorial session to Google Forms so that your instructor may evaluate your progress. This feature is only available for students from participating institutions.
If you choose ‘yes’, a form will open in your web browser. Complete and submit the form.
You can submit multiple attempts and the best attempt will be graded. You will receive full marks as long as you answered all questions (i.e. did not use ‘skip’). If you used ‘skip’ because you could not answer a question, please contact your instructor for advice.