Author Archives: Julia Marden

R Open Labs: mi

Last week, Professor Ben Goodrich stopped by R Open Labs to show us how to use the mi package, which he worked on with Professor Andrew Gelman.

As the name ‘mi’ suggests, this package does multiple imputations to help you predict missing values in your data sets.

missingdata

Screen capture of mi demo by Benjamin Goodrich

 

 

 

 

Check out the demo if you’d like to give the mi package a try!

R Open Labs continues every Weds, 10 am -12pm, through April 20th.  Drop in anytime! 

 

 

R Open Labs: QQPlot

Post by Ellie Ransom, Research Services Coordinator, Science and Engineering Libraries

At last week’s R Open Lab, we visualized our data to test our assumptions of normality using two of of R’s native commands, qqnorm and qqline.

We practiced using the built in dataset, trees, and looked at the variables Height and Volume separately.

Notice how the Height variable is basically normal, but the Volume variable appears to be skewed.

qqnorm(trees$Height)
qqline(trees$Height)

Inline image 2

qqnorm(trees$Volume)
qqline(trees$Volume)

Inline image 3

It might make sense to transform the skewed data before analyzing it!

qqnorm(log(trees$Volume))
qqline(log(trees$Volume))

Inline image 4

Share your thoughts and suggestions with us here, and we’ll see you next week!

R Open Labs: Loading Data

At last week’s R Open Lab, we explored two packages (Memisc and foreign) as well as some of R’s native commands for loading data files into our R Studio workspace.

View Slides

I <3 R

 

 

 

 

 

 

 

 

We practiced with ASCII, .TSV, .SAV, and .DTA files, all available from ICPSR, a data archive with a rich collection of social science data sets.

We’re taking a break from  R Open Labs this week, but we’ll be back on February 17 at 10 am in the DSSC.

Share your thoughts and suggestions with us here, and we’ll see you next week!

 

R Open Lab: Week 1

I <3 R

Last week, we kicked off R Open Labs with a demo on Base Graphics, or how to make graphics using basic commands. We also gave a brief intro to Swirl, a great package for learning R.

You can catch up here with these helpful slides: Base Graphics System

Check back next week, Wednesday, Feb. 3 at 10 am, for a quick demo on how to load different data files into R, a free I <3 R button, and plenty of time to practice your code and ask questions.

Got feedback or want to suggest a package to demo? Leave a comment or take our short survey!

R Open Labs this Spring in the DSSC

By WOCinTech Chat [CC BY-SA 2.0], via Flickr

By WOCinTech Chat [CC BY-SA 2.0], via Flickr

10am – 12pm
Every Wednesday
Digital Social Science Center

Stop by any Wednesday this Spring for R Open Labs. We start off every Open Lab with a 10 minute exploration of an R package or dataset; the rest of the time is yours to work on homework, research or building your coding skills in good company.

This Spring we’ll be digging into:

  • dplyr
  • ggplot2
  • Shiny
  • mySQL
  • your choice!

Beginners welcome!  We want to hear from you which datasets and packages you want to learn.

Continue reading