From 1a4cb172f0efd8b697c32e001537b46b17e7a4f1 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 30 Sep 2024 10:02:46 -0500 Subject: [PATCH] Use magrittr pipe --- README.md | 6 +++--- vignettes/why-pool.Rmd | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dc8d2e4..25ac9cd 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,11 @@ server <- function(input, output, session) { cars <- tbl(pool, "mtcars") output$tbl <- renderTable({ - cars |> filter(cyl == !!input$cyl) |> collect() + cars %>% filter(cyl == !!input$cyl) %>% collect() }) output$popPlot <- renderPlot({ - df <- cars |> head(input$nrows) |> collect() - pop <- df |> pull("mpg", name = "model") + df <- cars %>% head(input$nrows) %>% collect() + pop <- df %>% pull("mpg", name = "model") barplot(pop) }) } diff --git a/vignettes/why-pool.Rmd b/vignettes/why-pool.Rmd index 96ad8af..82f6277 100644 --- a/vignettes/why-pool.Rmd +++ b/vignettes/why-pool.Rmd @@ -158,11 +158,11 @@ server <- function(input, output, session) { cars <- tbl(pool, "mtcars") output$tbl <- renderTable({ - cars |> filter(cyl == !!input$cyl) |> collect() + cars %>% filter(cyl == !!input$cyl) %>% collect() }) output$popPlot <- renderPlot({ - df <- cars |> head(input$nrows) |> collect() - pop <- df |> pull("mpg", name = "model") + df <- cars %>% head(input$nrows) %>% collect() + pop <- df %>% pull("mpg", name = "model") barplot(pop) }) }