Why “Rolling Your Rs” ? Have you ever attempted to speak Spanish or Portuguese and lamented the fact that you can’t roll your Rs easily (if at all) ? People will tell you how to do it. There are even YouTube videos on it but you just have to imitate it and fumble your way into it. Sort of like “fake it till you make it”. That’s the way I felt when learning R. I’m still learning that way and it will work for you too…

So this blog is about the R programming language. I like to learn things and pass them on in a way that I hope illustrates the power of the language. One of the great things about R is that there are many ways to do something. And one of the most frustrating things about R is that there are many ways to do something. Sounds like a contradiction ? Not really. I mean “frustrating” in the sense that just as you think you have a good approach to solve a problem using R, you then see another solution, (maybe in a blog, research paper, or a book), that looks nothing like yours, has fewer lines of code, and probably even runs faster. Don’t despair. It happens to me all the time and I’m supposed to know what I’m talking about.

It is for this reason that I take the approach of “showing” examples that I think are generally useful. Imitate them and use to your own ends. There are lots of resources on the basics of the R language so it would be redundant for me to go over that material here. At least I think so. Anyway, I hope you enjoy what you read here and I’m open to writing on specific topics by request. I might not always have the time but I’ll try.

  1. Shelley Edwards says:

    Hello 🙂 I am glad that there is someone out there who can explain not only the workings of R, but also basic statistics in a clear and understandable way 🙂 I have seen your videos on PCAs and they have helped immensely! If I were to request anything, I would ask if you know of a good package or relevant R code to do a phylogenetic ANCOVA?
    Thanks your help thus far 🙂

  2. thebluephantom says:

    Hi Steve,

    I have a question about the standardization of the phys and stats scores with the PCA example that you presented in 2012. Whilst I understand the scaling thing (but not quite it appears), these two scores had some scale already, so why did we actually need to scale?

    Please advise.

    Thanks in advance,

    • Stevie P says:

      Hi Ged, In this case we don’t really need to scale since we have a common scale for the scores. However, in the “real world” lots of the data we examine usually does involve different scales so I just went ahead and presented the example with the scaling since it won’t hurt for newcomers to see how it could be done in this case. Of course there are packages in R that will do this for you and as part of the function call to do the PCA. Thus in my basic example I did it by hand.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s