Created
May 31, 2017 16:10
-
-
Save MaximePawlakFr/382371ab80efbeb01811213d86994ea5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's read a file and see what is inside | |
who = read.csv("WHO.csv") | |
str(who) | |
summary(who) | |
# Divide and Conquer ! | |
who_europe = subset(who, Region == "Europe") | |
which.min(who$Under15) | |
# Drawing is fun | |
plot(whi$GNI, who$FertilityRate) | |
# I told you, I wanted to divide ! | |
outliers = subset(who, GNI > 10000 & FertilityRate > 2.5) | |
nrow(outliers) | |
# Draw again | |
hist(who$CellularSubscribers) | |
boxplot(who$LifeExpectancy ~ who$Region) | |
table(who$Region) | |
table(who$Over60, who$Region, mean) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment