Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ZAD. 1
- library(ggplot2)
- library(PogromcyDanych)
- setLang(lang = 'eng')
- ggplot(cats_birds, aes(x = length,
- y = speed,
- shape = group,
- color = group)) +
- geom_point(size = 5) +
- geom_line()
- #tutaj nie jestem pewien tej linii
- #ZAD. 2
- ggplot(pearson, aes(x = son,
- y = father,
- color = son)) +
- geom_point(size = 1)+
- geom_smooth(color = 'red')
- #ZAD. 3
- ggplot(seriesIMDB, aes(x = series,
- y = note)) +
- geom_boxplot()
- #brakuje sortowania
- #ZAD. 4
- ggplot(diagnosis, aes(x = eduk4_2013,
- fill = gp29)) +
- geom_bar()
- #ZAD. 5
- auta2012 %>%
- filter(Brand == 'Volkswagen',
- Model == 'Passat') %>%
- select(Brand, Model, Year, Price) -> data.paseratti
- figure<-ggplot(data.paseratti, aes(x = Year, y = Price)) +
- geom_smooth()+
- ylim(0, 20000)
- figure + theme_bw()
- figure + theme_gray()
- figure + theme_dark()
- figure + theme_classic()
- figure + theme_light()
- figure + theme_linedraw()
- figure + theme_void()
- figure + theme_excel_new()
- figure + theme_minimal()
- figure + theme_economist()
- figure + theme_fivethirtyeight()
- figure + theme_foundation()
- #ZAD. 6
- auta2012 %>%
- filter(Brand == 'Toyota') %>%
- select(Brand,Model) %>% group_by(Model) %>% summarise(counter = n()) ->data.toyki
- data.toyki[order(data.toyki$counter,decreasing = TRUE),] %>% top_n(5)->najtoyki
- area<- ggplot(najtoyki, aes(x="", y=counter, fill=Model))+
- geom_bar(width = 1, stat = "identity")
- area
- pie <- area + coord_polar("y", start=0)
- pie
- auta2012 %>%
- filter(Brand == 'Toyota') %>%
- select(Brand,Model)->bartoyki
- #brakuje barplota
- ggplot(bartoyki , aes(x = najtoyki$Model)) +
- geom_bar()+
- ylim(0, 1750)
- #ZAD. 7
- #tego zadania ani ja ani Ola nie kumamy xD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement