Learning R. Where does it start?

I have been using R for a little over a year, and it has been a successful venture. But too often, I find that there is something that I cannot understand due to a lack of knowledge of how to find it or an example of this.

Stack overflow

Could you recommend a way to teach R in such a way as to provide him with a set of tools for solving statistical problems?

There is a lot of knowledge on the Internet between the r-project website and the mailing lists, but it seems to be everywhere and nowhere when you are really looking for it.

For example, when I first started using R, I went through "Intro to R". Then I read the definition of language (which, obviously, did not drown). But every time I ask a question about Stackoverflow, I am presented with a new badass function, which is the solution to all my problems in the short term. My question is: how did you know that these functions exist in the first place? And how can they be found? Presumably, you read something or found some resources that distracted your learning from the exponential part of the curve. What was it?

Obviously, the functionality of R as a statistical tool is wide. For my purposes, I work mainly with economic or financial data. Consequently, answers to this would be most useful.

+51
r
Jul 30 '10 at 22:25
source share
12 answers

Fully biased answer: learn plyr , reshape2 and ggplot2 . They will cover 90% of your data processing and visualization needs. All three packages have a consistent data philosophy (which includes the ggplot2 book), and they are designed to be consistent and learn.

Instead of learning many specialized functions, I really recommend that you learn about simple functions that can be flexibly designed to solve a wide range of problems. This is what plyr is trying to do for data manipulation, and what ggplot2 aims to do for visualization. This means that you need to invest more time to learn a little about the underlying theory, but I believe that in the long run it will pay off.

+53
Jul 31 '10 at 17:29
source share

How did I recognize R.

Resources

R:

  • To learn R, the most important resource is Google. search: "TOPIC r-project", "TOPIC filetype: r" or "TOPIC site: nabble.com".

  • Secondly, see the sample code provided by most packages. go to the section http://bm2.genes.nig.ac.jp/ ", find the topic and see the sample code. run it and adapt it, so you can often solve part of your problem.

  • Third: the r-help mailing list. Read messages, questions are asked again and again. If you have a problem and are completely stuck, ask a question on the mailing list.

  • Finally, look at the source code for the R packets. this is the hardest part. if you can change the code according to your needs, you have mastered R; -)

Some tips:

  • R has a steep left curve. this is a function ;-), it is designed to solve complex problems, and in the end you are faster than using the alternative R.

  • Know each R package and feature that are relevant to your problem. R's strength is that there are so many packages available (around 2000, I think). Usually there is always a package that is more suitable or already solves your problem. (some help pages are poorly written and hard to understand - I'm used to it)

  • R books do not help in learning R. Yes, that's true. If you are an expert programmer and an expert statistician, you do not need a book about R. (the only exception is the book Hadley Wickhams ggplot2). If this is not the case, study programming in general and / or advanced statistics.

  • Some R packages have errors that no one can fix (the package owner left the university, etc.). just a warning, it can be difficult if you are looking for an error in the code, and an error in the package R.

+8
Aug 01 2018-10-10T00:
source share

There is a free book that might interest you: An introduction to probability and statistics using R

+7
Jul 30 '10 at 10:32
source share

I will start with this:

My question is: how did you know that these functions exist in the first place?

Simple - we tried to solve a similar problem and ran into this function. It either fits or doesn't fit our needs, but we now know it. I did not use R very personally, but what you describe is a learning curve for each programming language. First, you study “grammar,” that is, what you can do. Then you are trying to do something. You find that you cannot.

At this point, the programmer has several options. What am I doing personally? It depends. I will try to find this package / header / library / any member functions to find out if something is suitable for my needs. I could have done this with Google, because if you really didn’t push the boundaries, someone somewhere probably tried and couldn’t do this before, and they answered their question. If you push the borders, someone somewhere probably tried before and couldn't, but didn't get an answer. I could try a forum or two to see what happens. I personally do not use IRC a lot, but this is another option, as well as mailing lists, depending on how specialized the problem is.

I also have a folder on my computer, full of books that I look at depending on the problem, and a small library of books that I look through / study, which often contain practical, not quite accessible, but adaptable examples.

My only comment will be trying to read the language specification; it is unlikely to be massively useful to you as a beginner. You cannot fully understand what this means, because you have not pushed the boundaries and tried. For example, a newbie in C might try the following:

 char c = '7'; int x = (int) c; 

to convert the character '7' to integer form. This is not a bad process until you understand how characters and ASCII work, then you see why the above does not give you what you want.

In short, I think this will be part of the learning process, and I do not think that you can shorten it. Consolation is like any research, the more you do it, the more you will know where to look and what questions to ask in different communities.

+7
Jul 30 '10 at 22:39
source share

One of the things I do is follow the RSS feed of R questions on SO ( https://stackoverflow.com/feeds/tag/r ). Then I can see what other people have asked / answered.

Often I will be my favorite specific question / answer if I think I will use it, or write down the main points in my laptop software ( OneNote ), occaisonaly I will even try the question / answer itself.

EDIT:

I also recommend Patrick Burn's book R-Inferno . This is not so much a training book as a description of all the received and oooh that Patrick found (so far).

+7
Aug 01 2018-10-10T00:
source share

Here is a good list of resources for learning R:

https://stats.stackexchange.com/questions/138/resources-for-learning-r

In addition, this website as a whole is a good resource.

In general, I would say that the following mailing list or help list is the best way to find new things. (This and R Magazine: http://www.r-bloggers.com )

+5
Aug 01 '10 at 2:02
source share

Studying the RODBC package for direct interaction with Oracle data has had a big impact on my work. My boss was amazed when I pulled Oracle data directly into R and scrolled the plot in only a few lines of code. Try it in Excel!

The moral of the story is to learn how to extract data and manipulate it within R. Then go on to some cooler materials like ggplot.

+4
Aug 18 '10 at 21:32
source share

I can recommend Penn University's Introductory R course .

The ggplot chapter alone is worth reading - I found ggplot very confusing, but this is a great explanation.

+4
Aug 11 '11 at 16:40
source share

The book that helped me learn the most was The Art of Programming R. Many programming books may be dry. Since R is usually the entry point to programming, it is important that the voice of the materials resonate with the student. This book has done this to me. The voice felt very random, and I liked it.

+2
Sep 22 '13 at 17:52
source share
+1
Aug 05 '10 at 8:14
source share

The frequently asked questions in the [R] section, right here in Stackoverflow, https://stackoverflow.com/a/166268/11/11/11/en/products/questions/tagged/ ... provide numerous reproducible examples that can be used for “learning”.

Most problems are very common and will eventually become what you have to look for as a beginner. Frequently asked questions also provide highly competent (and experienced) use cases for a variety of features and useful packages.

If you are new to R and you prefer to use the learning approach more often, frequently asked questions should not be overlooked as a potential learning resource. Many of the questions also provide a useful discussion of the paradigms of the language itself (vectorization, workflow, debugging are just a few examples).

Almost every question in the FAQ is often worth exploring as a new user, because it touches on elements that, speaking for themselves, I would like to indicate when I asked this question initially.

Just a few examples:

  • How to make a great R reproducible example
  • Grouping functions (e.g., Totally) and * apply family
  • Workflow for statistical analysis and reporting
  • How to sort data by multiple columns?
  • What is your favorite R stunt?
+1
Dec 17 '12 at 19:43
source share

For example, you can start with the RStudio, R IDE, which makes it easy to start an R project. The code developed in RStudio works fine in an R project, so you don't have to rewrite everything. Also read this post http://www.robertomarchetto.com/learn_r_project_free_pdf_book for some books in PDF format.

+1
Nov 27 '13 at 10:32
source share



All Articles