• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Analysis Factor

The Analysis Factor

Statistical Consulting, Resources, and Statistics Workshops for Researchers

  • Home
  • Our Programs
    • Membership
    • Online Workshops
    • Free Webinars
    • Consulting Services
  • About
    • Our Team
    • Our Core Values
    • Our Privacy Policy
    • Employment
    • Collaborate with Us
  • Statistical Resources
  • Contact
  • Blog
  • Login

What Really Makes R So Hard to Learn?

by Kim Love 1 Comment

If you are like I was for a long time, you have avoided learning R.

You’ve probably heard that there’s a steep learning curve. Or noticed that the available documentation is not necessarily user-friendly.

Frankly, both things are true, to some extent.

R is Open-Source

The best and worst thing about R is that it is open-source. So there is no single company that is responsible for R or your ability to use it.

While there is a developer community that maintains a set of standards and regulated documentation, anyone can add new functionality to R through user-created “packages.”

This gives R users a large, flexible range of options (once you know how to install the packages, of course!), which can be a major advantage.

On the other hand, these packages are as diverse as the users who create them, and they may emphasize different model features, output displays, and even basic methodological principles.

How R Thinks

Underlying all of this, though, is what I feel is the truly intimidating part of R: that is, how R thinks. For those of us who are used to using SAS, SPSS, and most other commercially-based statistical software products, the way that we interact with R feels dauntingly unfamiliar.

Consider running a linear model in SAS or SPSS.

We write some code, or click some buttons and follow some menus, and there’s our output. The software  might give us slightly different output, depending on what options we include or check off. But that’s the basic story every time. We run a model, and our results appear.

Not so with R.

Let’s take a look at the syntax you might use to run a basic one-way ANOVA in R. We will use a dataset called data1. (Notice I say might, because there is more than one way to do this!)

model1 <- lm(yvar ~ factorvar, data=data1)

We run the syntax, and…

> model1 <- lm(yvar ~ factorvar, data=data1)
>

…

Nothing.

Did it work? And if it did work, where are the results?

Turns out, R stored them as an object called model1. If we want to see the results, we have to ask for them, and we have to know how.

If we want to see the ANOVA table, for example, one option is to run a function called anova on that object:

anova(model1)

If we want to see the actual solution to the model, along with some other basic statistics, we might run a different function on that object:

summary(model1)

Yes, this might seem burdensome and unnecessary at first. But the more you program in R, the more the advantages of this system become clear. It is exactly what gives R the wonderful flexibility and range that experienced R programmers always seem to be talking about.

Growing your understanding of this “object-based” programming opens many doors.

Most importantly, a deeper understanding of R objects and the functions we use on them is the key to being able to understand the documentation that seems so out of reach when we first start trying to learn R.

Tagged With: programming, R, R is not so hard, R objects, R packages, Statistical Software

Related Posts

  • The Advantages of RStudio
  • Member Training: What’s the Best Statistical Package for You?
  • R Programming Video: 15 Tips for The Beginner
  • R Is Not So Hard! A Tutorial, Part 11: Creating Bar Charts

Reader Interactions

Comments

  1. Alan Mainwaring says

    December 31, 2020 at 4:22 pm

    When I heard about “R” and downloaded and installed it I was very disappointed. In retrospect all I got was, well basically a command line. Strangely this command line was called a “GUI” that is a Graphic User Interface. I was then expecting this GUI to be like a click and point Statistical Application like SPSS. Of course this is incorrect.
    What really switched me onto R was the concept one could install packages. Here was the next hurdle. Which ones would really get you started ?This where the package R Commander turned out to be so helpful, known by its acronym “Rcmdr” even here you must be aware that R is case sensitive.
    R Commander is called training wheels for R and I reckon its a very good start for first time users. At my University we have now R Commander installed in all our computer labs. We now have all our students using it and liking it.
    Sure R Commander has its issues but it is a really good start, later on students move onto R Studio. I love R but this has taken me quite a few years to get used to it. Of course I am still learning like for example permutation ANOVA you never stop learning R.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.

Primary Sidebar

This Month’s Statistically Speaking Live Training

  • Member Training: Analyzing Pre-Post Data

Upcoming Free Webinars

Poisson and Negative Binomial Regression Models for Count Data

Upcoming Workshops

  • Analyzing Count Data: Poisson, Negative Binomial, and Other Essential Models (Jul 2022)
  • Introduction to Generalized Linear Mixed Models (Jul 2022)

Copyright © 2008–2022 The Analysis Factor, LLC. All rights reserved.
877-272-8096   Contact Us

The Analysis Factor uses cookies to ensure that we give you the best experience of our website. If you continue we assume that you consent to receive cookies on all websites from The Analysis Factor.
Continue Privacy Policy
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT