Category Archives: Updates

Notes from 06/01/12

Here are some things we discovered:

To read in your data, type  data=read.csv(“electric.csv”)
Then in the upper right window of RStudio, look at the Workspace. Clicking on the new data file will bring up a spreadsheet to look at it.

To work with just one variable in a datafile, the syntax is data$variable
e.g., describe(fred$pooltemp)

 

R Discussion Group 6/01/12

What’s a pirate’s favorite statistical software? Arrrrrr!

Here are some resources that might be helpful in our discussions of R this summer.

First is an extremely useful handout put together by Professor Ming-Wen An in the Math department. This handout covers all of the basics of R in a very organized way.

One thing that this handout doesn’t get to is a discussion of the “packages” available for R. R is, essentially, just a really powerful calculator. It also allows you to create complicated strings of calculations, and to give those functions names. Packages are collections of new functions that other users have created and made available, which allow you to do more complicated functions easily by referring to their names.

One example is a package called “psych”. This is a package put together by Prof. William Revelle at Northwestern University, to do some common tasks we use in psychology (e.g., descriptive statistics of variables, calculating alpha reliabilities). To install a new package in R-Studio, go to the lower-right window, click on the Packages tab, then click Install Packages. Then just type the name of the package you want to install.

Here are some relatively focused resources for R:

And some more general resources: