Articles by Slawa Rokicki

How to use lists in R

August 25, 2015 | Slawa Rokicki

In the [last post](http://rforpublichealth.blogspot.com/2015/03/basics-of-lists.html), I went over the basics of lists, including constructing, manipulating, and converting lists to other classes. Knowing the basics, in this post, we'll use the **apply()** functions to see just how powerful working with lists can be. I've done two ... [Read more...]

Basics of Lists

March 9, 2015 | Slawa Rokicki

Lists are a data type in R that are perhaps a bit daunting at first, but soon become amazingly useful. They are especially wonderful once you combine them with the powers of the apply() functions. This post will be part 1 of a two-part series on the u... [Read more...]

Animations and GIFs using ggplot2

December 26, 2014 | Slawa Rokicki

Tracing a regression lineDiverging density plotsHappy New Year plot Happy New Year everyone! For the last post of the year, I thought I'd have a little fun with the new animation package in R. It's actually really easy to use. I recently had some fun w...
[Read more...]

Mastering Matrices

April 7, 2013 | Slawa Rokicki

R has many ways to store information.  Most of the time, our data comes in the form of a dataset, which we bring into R as a data.frame object. However, there are times when we want to use matrices as well. This post will show you how matrices can... [Read more...]

Normal distribution functions

February 25, 2013 | Slawa Rokicki

Ah, the Central Limit Theorem.  The basis of much of statistical inference and how we get those 95% confidence intervals.  It's just so beautiful!  Lately, I have found myself looking up the normal distribution functions in R.  They... [Read more...]

Converting a dataset from wide to long

February 1, 2013 | Slawa Rokicki

I recently had to convert a dataset that I was working with from a wide format to a long format for my analysis.  I struggled with this a bit, but finally found the right sources and the right package to do it, so I thought I'd share my practical ... [Read more...]

Translating Weird R Errors

January 20, 2013 | Slawa Rokicki

I love R. I think it's intuitive and clever and overall a great language. But I do get really annoyed sometimes at the completely ridiculous, cryptic error messages it often gives me.  This post will go over some of those seemingly nonsensical err... [Read more...]

For loops (and how to avoid them)

January 14, 2013 | Slawa Rokicki

My experience when starting out in R was trying to clean and recode data using for() loops, usually with a few if() statements in the loop as well, and finding the whole thing complicated and frustrating.In this post, I'll go over how you can avoi... [Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)