![Page 1: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/1.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/2.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/3.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/4.jpg)
is a Statistical Computing Language
![Page 5: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/5.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/6.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/7.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/8.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/9.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/10.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/11.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/12.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/13.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/14.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/15.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/16.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/17.jpg)
Lets Install
![Page 18: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/18.jpg)
![Page 19: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/19.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/20.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/21.jpg)
![Page 22: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/22.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/23.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/24.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/25.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/26.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/27.jpg)
Here is the Front End
![Page 28: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/28.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/29.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/30.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/31.jpg)
![Page 32: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/32.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/33.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/34.jpg)
Loading Packages
![Page 35: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/35.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/36.jpg)
![Page 37: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/37.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/38.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/39.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/40.jpg)
Lets enter some
commands
![Page 41: Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installing R and RStudio - Professor Daniel Martin Katz](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/41.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/42.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/43.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/44.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042623/5482607fb47959000d8b47a7/html5/thumbnails/45.jpg)
Can You Earn All 7 Badges ?
http://tryr.codeschool.com/