在magrittr管道中使用闪亮的渲染函数,例如在具有闪亮运行时的html_笔记本中使用可渲染的renderPlot

在magrittr管道中使用闪亮的渲染函数,例如在具有闪亮运行时的html_笔记本中使用可渲染的renderPlot,r,shiny,tidyverse,R,Shiny,Tidyverse,是否可以在管道的末尾使用shinny::render*函数系列%%?具体地说,当使用html\u笔记本时,运行时:闪亮 除了:renderTable({mtcars[1:5,]})之外,是否可以执行类似以下操作:mtcars[1:5,]%>%renderTable() 示例 --- title: "R Notebook" output: html_notebook runtime: shiny --- This is an [R Markdown](http://rmarkdown.rstud

是否可以在管道的末尾使用
shinny::render*
函数系列
%%
?具体地说,当使用
html\u笔记本时,
运行时:闪亮

除了:
renderTable({mtcars[1:5,]})
之外,是否可以执行类似以下操作:
mtcars[1:5,]%>%renderTable()

示例

---
title: "R Notebook"
output: html_notebook
runtime: shiny
---

This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. 

```{r echo=FALSE, warning=FALSE, message=FALSE}
library(tidyverse)

renderTable({
  mtcars[1:5, ]
})    
```

```{r echo=FALSE}
renderTable({
  mtcars %>%
    filter(cyl == 4) %>%
    group_by(am) %>%
    summarise(avg_gear = mean(gear),
              sd_carb = sd(carb))
})

# NOTE: This does not work!
mtcars %>%
  filter(cyl == 4) %>%
  group_by(am) %>%
  summarise(avg_gear = mean(gear),
            sd_carb = sd(carb)) %>%
  renderTable()
```
mtcars %>%
  filter(cyl == 4) %>%
  group_by(am) %>%
  summarise(avg_gear = mean(gear),
            sd_carb = sd(carb)) %>%
  renderTable(quoted = TRUE) # quoted defaults to FALSE