library(dplyr)
library(magrittr)
library(ggplot2)
c(3, 5) %>% mean()
## [1] 4
liida <- function(arv1, arv2){
arv1+arv2
}
3 %>% liida(4)
## [1] 7
mtcars %>% group_by(am) %>% summarise(keskmine=mean(mpg)) %>% ggplot(aes(x=am, y=keskmine)) + geom_point()
select(mtcars, mpg)$mpg %>% mean()
## [1] 20.09062
(mpg~hp) %>% plot(mtcars)
plot(mpg~hp, mtcars)
mtcars[mtcars$am == 1,] %$% mean(mpg)
## [1] 24.39231