Langzzx / dand-advanced-2018

personal repo for Udacity dand course
0 stars 0 forks source link

R cheatsheet #7

Open Langzzx opened 6 years ago

Langzzx commented 6 years ago
  1. cut_width:

    diamonds %>% count(cut_width(carat, 0.5))

  2. filter:

    smaller <- diamonds %>% filter(carat < 3)

  3. separate data:

    table3 %>% + separate(rate, into = c('case', 'population'))

  4. string process:

    who3 <- who2 %>% separate(key, c("new", "type", "sexage"), sep = "_")

Langzzx commented 6 years ago

Relational data

Collectively, multiple tables of data are called relational data