forked from INFO-498F/lecture-7-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercise3.R
More file actions
27 lines (15 loc) · 693 Bytes
/
exercise3.R
File metadata and controls
27 lines (15 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#### Exercise 1 ###
# Install devtools package: allows installations from GitHub
# install.packages('devtools')
# Install "fueleconomy" package from GitHub
# devtools::install_github("hadley/fueleconomy")
# Require/library the fueleconomy package
# library(fueleconomy)
# You should have have access to the vehicles data.frame
# View(vehicles)
# Which Accura model has the best hwy MPG in 2015? (without method chaining)
# Which Accura model has the best hwy MPG in 2015? (nesting functions)
# Which Accura model has the best hwy MPG in 2015? (pipe operator)
### Bonus ###
# Write 3 functions, one for each approach. Then,
# Test how long it takes to perform each one 1000 times