+ - 0:00:00
Notes for current slide
Notes for next slide

Introduction to R and RStudio



Thiyanga S. Talagala, University of Sri Jayewardenepura

SLAAS: Section C - Aug 28/29, 2021
Slides: https://r4fun.netlify.app/

1

R Programming Language

  • R is a software environment for statistical computing and graphics.

  • Language designers: Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand.

2

Minitab - Menu driven software

R - Scripting language

3

Pros

  • Do not have to remember the commands.

  • User friendly.

Cons

  • Irritating if there are too many levels of menues to move around.

  • Difficult to reproduce results.

4

Scripting language

Pros

  • Useful for collaborative research.

  • Ideal for reproducible research

Cons

  • The learning curve may be difficult at the start.
5

Why learn R?

  • Free and open-source software package

  • A large online community that makes it fun to learn

  • Latest cutting edge technology

  • Easier to update analysis

  • Easier to reproduce analysis

  • Easier to collaborate with others

  • Easier to automate analysis

6
7

Your Turn

Open RStudio by clicking on the RStudio icon

8

The RStudio Panes

9
10
11
12
13
14
15
16
17
18

How to customize your RStudio theme?

19

Tools > Global Options > Appearance

20
21

R and RStudio

22

If R were an airplane, RStudio would be the airport, providing many, many supporting services that make it easier for you, the pilot, to take off and go to awesome places. Sure, you can fly an airplane without an airport, but having those runways and supporting infrastructure is a game-changer."

Julie Lowndes

23

Create a new project

24
25
26
27
28
29
30

Installing R packages

31

32

R Packages

33

Method 1

install.packages("tidyverse", dependencies = TRUE)
34

Method 1

install.packages("tidyverse", dependencies = TRUE)

Method 2

35
36

Recap

✅ R and RStudio

✅ RStudio panes

- Console
- Source
- Environment/ History
- File/ Plots/ Packages/ Help

✅ R packages installation

37

R Programming Language

  • R is a software environment for statistical computing and graphics.

  • Language designers: Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand.

2
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow