-
Notifications
You must be signed in to change notification settings - Fork 635
/
exercise.R
36 lines (14 loc) · 909 Bytes
/
exercise.R
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
28
29
30
31
32
33
34
35
36
# Exercise 5: Gates Foundation Educational Grants
# Read data into a variable called `grants` using the `read.csv` function
# Use the View function to look at your data
# Create a variable `spending` as the `total_amount` column of the dataset
# Confirm that your `spending` variable is a vector using the `is.vector` function
# Create a variable `org` as the `organization` column of the dataset.
# Unfortunately, it will not be a vector by default, so you must transform it using the as.vector function
### Now you can ask some more interesting questions about the dataset. Store your answers in variables ###
# What was the mean grant value?
# What was the dollar amount of the largest grant?
# What was the dollar amount of the smallest grant?
# Which organization received the largest grant?
# Which organization received the smallest grant?
# How many grants were awarded in 2010?