11.13.2013

Week 13: Working with Rstudio and Data

For class this Thursday, each group should have a laptop with Rstudio installed, and a dataset that's ready to be imported.

Rstudio

  • First, you need to install R from here.
  • Next, install Rstudio from here.
  • There's very good documentation on Rstudio here. Learning a few shortcuts and understanding syntax highlighting can make your life much easier.


Importing Data

  • First, make sure you can open your data in a spreadsheet program like Excel or OpenOffice.
  • If there are multiple tables or "sheets", identify the most important ones, and think about how you might combine several tables together into a single table.
  • From your spreadsheet program, select "Save as" and save the spreadsheet as a CSV (comma-separated value) file.
  • Finally, load the CSV file using Rstudio ( nice instructions here).

For class, please download this R script and data file to the same directory.

No comments:

Post a Comment