-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtidy1.Rhistory
27 lines (27 loc) · 978 Bytes
/
tidy1.Rhistory
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
##------ [/home/kirill/uniwitten] Sat Jul 15 12:50:26 2017 ------##
library(DSR)
library(tidyverse)
t3 <- table3
t3
t3 %>% separate(rate, c("cases", "pop"), sep = "/")
t4
t4 <- table4
t5 <- table5
t4
t5
t5 %>% separate(rate, c("cases", "pop"), sep = "/")
t5 %>% separate(rate, c("cases", "pop"), sep = "/") %>% mutate(y = paste0(century, year))
t5 %>% separate(rate, c("cases", "pop"), sep = "/") %>% mutate(year = paste0(century, year))
t5 %>% separate(rate, c("cases", "pop"), sep = "/") %>% mutate(year = paste0(century, year)) %>% select(country)
t5 %>% separate(rate, c("cases", "pop"), sep = "/") %>% mutate(year = paste0(century, year)) %>% select(-century)
t5_split <- t5 %>% separate(rate, c("cases", "pop"), sep = "/")
t5_split
ls()
str(t5_split)
t5_split <- t5 %>% separate(rate, c("cases", "pop"), sep = "/") %>% mutate(pop = as.numeric(pop))
str(t5_split)
t5_split
write.csv(t5_split, "t5.csv")
table4a
table4a %>% data.frame %>% str
savehistory("tidy1.Rhistory")