Learning R with {swirl}

People sometimes ask what the best tool or software package for doing data science is. The answer is the tool or tools that get the job done! Data science is more about the process and results than any particular piece of software or technology. It is definitely useful for the analyst to be familiar with a range of tools so that he or she can choose the most appropriate one for the task at hand.

R is an increasingly popular data science tool. It was recently ranked 5th in the IEEE Spectrum 2016 list of Top Programming Languages ahead of popular multi purpose languages like php, Javascript and Ruby. R is a domain specific language, used in statistical computing (and therefore a lot in data science!) and based on the S programming language. R brings a lot to the table in terms of statistical functionality and advanced graphing capabilities. The Comprehensive R Archive Network (CRAN) has almost 10,000 R packages which are bundles of code, data and functions that can be downloaded and used to help solve a particular problem. The list of packages and associated functionality is one of the major advantages of R.

A quick way to get started learning R is to use the swirl package which converts the console into an interactive learning environment.

1. Download and install R itself and the excellent open source IDE R studio.
2. Navigate to Tools – Install Packages and install Swirl. Once installed call swirl with library (swirl), run it with swirl() and off you go!

#once r is installed you can run swirl with the code below
install.packages(swirl) 
library (swirl) 
swirl()

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.