Learn R Programming from Swirl R Package

R Users Group Philippines

Rowen Remis R. Iral - IT Engineer - Data Scientist - Online Marketer - Business & Systems Analyst - Analytics

Rowen’s Blog [http://wenup.wordpress.com]

Install the Swirl Package

Install Swirl package for loading tutorials

install.packages("swirl")

Load library swirl

library(swirl)
## 
## | Hi! Type swirl() when you are ready to begin.

Starting Swirl

Type:

swirl()

Welcome to swirl!

Please sign in. If you’ve been here before, use the same
name as you did then. If you are new, call yourself
something unique.

What shall I call you? rowen

Thanks, rowen. Let’s cover a few quick housekeeping items
before we begin our first lesson. First of all, you should
know that when you see ‘…’, that means you should press
Enter when you are done reading and ready to continue.

… <– That’s your cue to press Enter to continue

Also, when you see ‘ANSWER:’, the R prompt (>), or when you
are asked to select from a list, that means it’s your turn
to enter a response, then press Enter to continue.

Select 1, 2, or 3 and press Enter

1: Continue. 2: Proceed. 3: Let’s get going!

Selection: 1

When you are at the R prompt (>):
– Typing skip() allows you to skip the current question.
– Typing play() lets you experiment with R on your own;
swirl will ignore what you do…
– UNTIL you type nxt() which will regain swirl’s attention.
– Typing bye() causes swirl to exit. Your progress will be
saved.
– Typing main() returns you to swirl’s main menu.
– Typing info() displays these options again.

Let’s get started!

Please choose a course, or type 0 to exit swirl.

1: R Programming 2: Take me to the swirl course repository!

Selection: 1

Please choose a lesson, or type 0 to return to course menu.

1: Basic Building Blocks 2: Workspace and Files
3: Sequences of Numbers 4: Vectors
5: Missing Values 6: Subsetting Vectors
7: Matrices and Data Frames 8: Logic
9: Functions 10: lapply and sapply
11: vapply and tapply 12: Looking at Data
13: Simulation 14: Dates and Times
15: Base Graphics

Selection:

Ready to Learn R Programming

Select the topic and follow instructions, also follow the format as swirl reads the characters you type in the console.

References:

sessionInfo()
## R version 3.2.3 (2015-12-10)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 7 x64 (build 7601) Service Pack 1
## 
## locale:
## [1] LC_COLLATE=English_United States.1252 
## [2] LC_CTYPE=English_United States.1252   
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.1252    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] swirl_2.2.21
## 
## loaded via a namespace (and not attached):
##  [1] digest_0.6.8    crayon_1.3.1    bitops_1.0-6    R6_2.1.1       
##  [5] magrittr_1.5    evaluate_0.8    httr_1.0.0      stringi_1.0-1  
##  [9] testthat_0.11.0 rmarkdown_0.8.1 tools_3.2.3     stringr_1.0.0  
## [13] RCurl_1.95-4.7  yaml_2.1.13     memoise_0.2.1   htmltools_0.2.6
## [17] knitr_1.11