Developers Club geek daily blog

1 year, 1 month ago
swirl: prompt immersion in R (learning by doing)

Still some one and a half years ago I was one of those who with conviction said "No, programming is definitely not for me". I will not risk to tell that I became a programmer, but for the last year R replaced to me the majority of daily programs for work. I work as the researcher. With interest I observe how gradually R becomes the standard in the academic world. Generally, in the world the understanding that it makes sense to communicate with the computer slightly more freely, than at the level of the click&drag; programs spreads.; So, quite recently the Jellyfish wrote that not everything proger virgins programming should be studied to much more wide range of people, than was always considered to be.

In this post I will tell about one of the shortest ways to programming — studying of R by means of a special packet of swirl (the packet in R is the same that in many other languages is called library, expansion/addition of initial functionality). The post is expected the reader with zero knowledge of R interested in studying of this programming language; it will help as it seems to me, most effectively and without serious consequences to take the first steps in a programming dark.

Why R?
Short answer: because only I can share it, I do not know other programming languages.

The unrolled answer: R — a versatile tool which can be useful to very wide range of specialists. It is completely open and very dynamically developing project with a lot of inspired followers worldwide. Everyone can write the packet and lay out in open access (it really not really difficult). R gives boundless opportunities for data visualization. To be inspired, it is possible to glance in one of galleries (for example, this post.

On Habré there are a lot of publications with use of R. There are also posts about the language, for example R crib. Is possible to subtract a lot of curious from the text of the person who found R nearly at the sources.

For the researcher of R is just must.


So, all of you are with me. Means, without wasting words we will do several simple steps to begin active training.

Attention!
Training requires the minimum ownership of English. In general, it is necessary to get used that the computer prefers to manage without great and mighty.


Step 1. Installation R
Here everything is simple. We visit the official site, we download under the axis, we set. Any difficulties. Cunnings are, but about it in the following post.

Step 2. We set RStudio
Similarly. We visit the official site, we download under the axis, we set. Absolutely any difficulties.

What else for RStudio?
RStudio is ide (a graphic cover) for R probably the most widespread method of use of R in general. It is the separate program which is built on over R. There are, of course, hardkorny proger who lose peace of mind at the sight of the drawn gui button. But we will leave them alone: the RStudio interface not only will be to the taste to most of users, but also considerably will facilitate life. Besides, is in RStudio and really unique pluses like projects and support functions for creation of packets. Well it is fine … Pluses of RStudio pull on a separate post. So far we will be limited to the fact that the program should be installed.

The program free of charge for personal use. Without any restrictions. The companies should pay for installation in commercial purposes.


Step 3. We set swirl

Everything that it is necessary — to write the following line to consoles and to click Enter

install.packages("swirl")

Some time in the console will be displayed installation process of a packet. At the end the program will report that everything is good. Now it is necessary to load swirl. For this purpose we use function

library("swirl")

In total! Interactive training began.

If difficult here and so it is simple to begin to write commands...
… the same can be done in RStudio by means of the convenient graphic interface.

In the right lower part of the screen in Rstudio there is a panel with auxiliary information. We are interested in the Packages tab. Further we Click Install

swirl: prompt immersion in R (learning by doing)

also the dialog box of installation of packets appears. We enter into the search line swirl and we confirm installation.

swirl: prompt immersion in R (learning by doing)

Installation process begins. It can take some time. At the end the program will report on successful installation, and swirl will appear in the list of packets.

swirl: prompt immersion in R (learning by doing)

If in RStudio to note the necessary packet in the list, it will be loaded in the current session. At the same time necessary function itself will be printed in the console.

swirl: prompt immersion in R (learning by doing)

Many simple operations in RStudio can be performed by means of the graphic interface.

There are very many interactive courses developed under swirl (in principle, nobody prevents to develop also the). The page of developers can look at the list of official rates on github. By default the course R Programming is established. Also it makes sense to begin with it with everything, getting acquainted with R.

R Programming and Coursera
The course is developed by command of researchers from John Hopkins's university as addition to esteem on Habré.

Additional courses are established by special function of a packet swirl, for example

install_from_swirl('Regression_Models')

Prompt training!

This article is a translation of the original post at habrahabr.ru/post/271265/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: sysmagazine.com@gmail.com.

We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.
Best wishes.

comments powered by Disqus