+ All Categories
Home > Technology > Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio -...

Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio -...

Date post: 05-Dec-2014
Category:
Upload: daniel-martin-katz
View: 862 times
Download: 0 times
Share this document with a friend
Description:
 
45
Quantitative Methods for Lawyers @ computational computationallegalstudies.com professor daniel martin katz Intro to the R Environment Installing R, R Studio Class Bonus Module
Transcript
Page 1: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Quantitative Methods

for Lawyers

@ computationalcomputationallegalstudies.comprofessor daniel martin katz

Intro to the R EnvironmentInstalling R, R Studio

Class Bonus Module

Page 2: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

In this introduction, I will curate for you the wonderful set of online resources thatyou can you to learn

Page 3: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Okay Lets Start With Some Quick Background

Page 4: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

is a Statistical Computing Language

Page 5: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

is a free, open source implementation of the S language

Page 6: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

has particular syntax and logic that

can be learned (but it takes some time)

Page 7: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

The Basic Installation Offers a Base Model of but you can load additional packages as needed to

customize your experienceand add functionality

Page 8: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Indeed, now features more than 4,000 different

packages

Page 9: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

The Ecosystem

Page 10: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

The Ecosystem

Page 11: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

Later, I will show you how to add

specific packages from CRAN

The Ecosystem

Page 12: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

Later, I will show you how to add

specific packages from CRAN

The Ecosystem

(such as ggplot2)

Page 13: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

But first, we will download the

following:

Core R

The EcosystemLater, I will show you how to add

specific packages from CRAN(such as ggplot2)

Page 14: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

But first, we will download the

following:

Core R

The EcosystemLater, I will show you how to add

specific packages from CRAN(such as ggplot2)

Page 15: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

R Studio (as our front end IDE tool)

But first, we will download the

following:

Core R

The EcosystemLater, I will show you how to add

specific packages from CRAN(such as ggplot2)

Page 16: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.ats.ucla.edu/stat/r/seminars/intro.htm

R Studio (as our front end IDE tool)

But first, we will download the

following:

Core R

The EcosystemLater, I will show you how to add

specific packages from CRAN(such as ggplot2)

Page 17: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Lets Install

Page 18: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz
Page 19: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

A Useful Video for You on Installing R on a Windows Machinehttp://www.youtube.com/watch?v=X_oFb2iAdu8

Page 20: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

A Useful Video for You on Installing R Studio on Windowshttp://www.youtube.com/watch?v=AZPbg29Plpw

Page 21: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz
Page 22: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

http://www.youtube.com/watch?v=ICGkG7Gg6j0A Useful Video for You on Installing R on a Mac

Page 23: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

A Second Useful Video for You on Installing R + RStudio on a Mac

http://www.youtube.com/watch?v=zMvwJtKY874

Page 24: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Note: Mac Users Might Also Benefit from Watching the PC

video (and vice versa)

Page 25: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

If you have successfully installed BOTH

and

Page 26: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Then, it is time to exploreSo open R Studio

Page 27: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Here is the Front End

Page 28: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

You Can Switch Your Colors in Preferences

Page 29: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

You Can Switch Your Colors in Preferences

Page 30: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

You Can Switch Your Colors in Preferences

Page 31: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz
Page 32: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Watch this video in full screen mode in order to get started with windows in R studio

http://www.youtube.com/watch?v=jPk6-3prknk

Page 33: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Lets Explore Some More Basic Stuff With R Studio

Page 34: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Loading Packages

Page 35: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

As promised, I will now show you how

to add specific packages from

CRAN

Page 36: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz
Page 37: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

ggplot2 is a very popular graphics

package

Page 38: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

ggplot2 is a very popular graphics

package

It is not included in the base install of R

Page 39: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

ggplot2 is a very popular graphics

package

It is not included in the base install of R

But it is quite easy

to add

Page 40: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Lets enter some

commands

Page 41: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Library () will provide us with

a list of currently installed packages

Page 42: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Scroll Through

andNotice that ggplot2 is not there

Page 43: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Type install.packages

(“ggplot2”)and hit return

(don’t forget the quotes)

Page 44: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Notice that is automatically installing the dependencies

this is great because not you do not have to go

install each of them by hand

:)

Page 45: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz

Can You Earn All 7 Badges ?

http://tryr.codeschool.com/


Recommended