dtplyr使用
devtools::install_github("tidyverse/dtplyr")
library(tidyverse)
library(dtplyr)
mtcars2 <- lazy_dt(mtcars)
mtcars2 %>%
filter(wt < 5) %>%
mutate(l100k = 235.21 / mpg) %>% # liters / 100 km
group_by(cyl) %>%
summarise(l100k = mean(l100k)) %>%
as_tibble()
library(tidyverse)
library(dtplyr)
mtcars2 <- lazy_dt(mtcars)
mtcars2 %>%
filter(wt < 5) %>%
mutate(l100k = 235.21 / mpg) %>% # liters / 100 km
group_by(cyl) %>%
summarise(l100k = mean(l100k)) %>%
as_tibble()
评论
发表评论