13
GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Embed Size (px)

Citation preview

Page 1: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

GradQuant SponsoredIntroduction to R Workshop

Heather Hulton VanTassel1/16/2014

Page 2: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

What is R?

• R is an integrated suite of software facilities for data manipulation, calculation and graphical display.

http://www.r-project.org/

Page 3: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Download R Studio

Download R here – http://www.rstudio.com/ide/download/

Helpful Manuals for R:– R intro manual

• http://cran.r-project.org/doc/manuals/R-intro.pdf

– “R Cookbook” by Paul Teetor

Page 4: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Workshop Outline

I. Familiarizing oneself with the R studio interface

II. Basics on using R

III. Getting help on functions – learn how to help yourself!

IV. Basic functions/commands

V. Brief intro on data management and analysis

Page 5: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Familiarizing with the R Studio Interface

•Switch to R studio!

Page 6: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

The Basics - Useful tips on entering commands

• R is case sensitive!

• Commands are separated either by a semi-colon (‘;’), or by a new line

• Comments can be put in text, starting with a hashmark (‘#’)

• If a command is not complete at the end of a line, R will give a different prompt, by default (‘+’)

Page 7: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

The Basics

•Switch to R studio!

Page 8: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Let’s get some help ?!?!

• Use help(functionname) to get help– ?functionname also works

• Use args(functionname) for a quick reminder of the function arguments

• Use example (functionname) to see examples

• Use ??keyword for help searching– help.search(“keyword”)

Page 9: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Let’s get some help ?!?!

•Switch to R studio!

Page 10: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

The Most Common Commands

The basics of coding!

• Switch to R studio!

Page 11: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Intro to Data Management/Analysis

• R comes with many built in data sets!– We will explore how we can play around with some

of them!

• Let’s first learn how to import a data set

• Let’s Switch to R studio!

Microsoft Excel Comma Separated Values Fi

Page 12: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

Questions?

• Let’s take some time to reflect and review what we have learned!

Page 13: GradQuant Sponsored Introduction to R Workshop Heather Hulton VanTassel 1/16/2014

What would you want covered in Advanced Topics?

• Let’s take some time to make sure we are on the same page!