How do I learn R programming

Learn to program with R.

R for data scientists, students and hobby programmers.

Go to the blog

Learn to program with R.

Would you like to learn R or deepen your knowledge of programming with R? Perfect - I'll show you everything from the basics to the advanced topics here. Just stop by my blog or drop me a line if you have specific questions that I haven't addressed yet!

To the blog

Learn in different subject areas

The blog currently has four categories. But as more and more posts are added, there will gradually be more topics on which I will write something. Do you have a specific problem or a desired topic? Write me an email to [email protected] or use the contact form below and I will write about it.

Questions and Answers

InQuestions and Answers you can find posts in which I answer reader questions with the help of examples.

Advanced

In the categoryAdvancedyou will find - as the name suggests - topics that go beyond the basics and can be a bit more specific. One example is troubleshooting via debugging.

statistics

Under statistics you will soon find posts on using statistical methods in R. Examples are calculating an analysis of variance, performing a factor analysis, or clustering methods.

Today I am writing about more complex processes in loops - or about how one can dynamically iterate through table columns in R ...

ggplot2 is a great package to create versatile charts. Today it's about creating such charts with the ggplot2 package in ...

Loops in R - that is our topic today. We'll cover for loops, while loops, and take a quick look at two apply functions ...

What is R anyway?

R is a programming language developed by statisticians especially for statistical analysis suitable is. It is a free implementation of the S programming language, which is also used for processing statistical data. R is open source (i.e. the source code is freely accessible to the public and can be used by anyone), free, and available for various operating systems. In addition, R is regularly developed further (guided by the "R Core Team"); It remains up-to-date and error-free, and is continuously optimized in terms of performance, for example.

R is supplied with a relatively spartan interface: it is actually just an interpreter (a program that interprets and converts the code) for which there is a console (or command line interface) to execute the commands or entire scripts in it. The program was created accordingly RStudio, one Development environment for R. In RStudio you have a much better overview: It also includes a console and a window for entire scripts, but also offers overviews of the defined variables (including variable types and values) and windows for documentation, created graphs and a file explorer. RStudio also supports Version control via Git and the creation and execution of e.g. R-Markdown files. Compared to e.g. SPSS, the beginning is a little more difficult with R, because you don't get the desired results via a graphical user interface, but have to enter everything yourself as a code.

There are several packages for R Libraries that greatly expand functionality. There are thousands of these "packages" and each additional library has a specific purpose. There are packages for financial analysis (e.g. quantmod or TTR), Web parsing (e.g. XML or rvest), Database access (e.g. RODBC or RPostgreSQL), Visualizations (e.g. ggplot2, ggvis, or htmlwidgets), or those that enable the writing of high-performance code (e.g. data.table or Rcpp).

R is right now known at universitieswho often offer their own courses for R and where scientists use R for their statistical analyzes. With the still relatively new big data hype and developments in the areas machine learning and artificial intelligence The level of awareness of R has continued to grow. According to a survey by kdnuggets, R the most frequently used programming language in 2016 Learning for data science and R is still worth it today. R is particularly suitable for more complex processes; For example, when it comes to larger workflows that involve various types of data manipulation or the creation of individualized reports.