标签: flexdashboard

列布局中的 R Shiny Flexdashboard ValueBox

我需要在 Shinydashboard 的列布局中对齐一些元素,该仪表板结合了 flexdashboard 中的一些元素。这是代码:

library(shiny)
library(shinydashboard)
library(flexdashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Dashboard"),
  dashboardSidebar(),
  dashboardBody(
    column(3,flexdashboard::valueBoxOutput("ValueBox")),
    #flexdashboard::valueBoxOutput("ValueBox"),
    column(3,plotOutput("plot1",height = 150)),
    column(6,h3("Gauges"),
           fluidRow(
             column(3,flexdashboard::gaugeOutput("Gauge1")),
             column(3,flexdashboard::gaugeOutput("Gauge2"))
             )
           )
    )
)

server <- function(input, output) {

  output$ValueBox <- renderValueBox({
    shinydashboard::valueBox(
      value = 100,
      subtitle = "Value",
      icon = icon("area-chart"),
      color = "aqua"
    )
  })

  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata
    hist(data)
  })

  output$Gauge1 <- flexdashboard::renderGauge({
    gauge(60, min = 0, max = 100, symbol = "%") 
  })  

  output$Gauge2 <- …
Run Code Online (Sandbox Code Playgroud)

r shiny shinydashboard flexdashboard

1
推荐指数
1
解决办法
4701
查看次数

flexdashboard 的离子名称

我想在构建仪表板时使用 ionicons 图标flexdashboard。从文档(https://rmarkdown.rstudio.com/flexdashboard/using.html#icon-sets)一个例子:

“ion-social-twitter”
Run Code Online (Sandbox Code Playgroud)

当我在 Iconons 网站 ( https://ionicons.com/ ) 中搜索相同的图标时,我得到

<ion-icon name="logo-twitter"></ion-icon>
Run Code Online (Sandbox Code Playgroud)

如果在我的 R 代码中插入“ion-logo-twitter”,它就不起作用。这个网站图标的正确名称是什么?谢谢

icons r flexdashboard

1
推荐指数
1
解决办法
2738
查看次数

更改 Flexdashboard 中激活页面的颜色

我的 flexdashboard 有问题。我想将具有多个页面的仪表板的导航栏颜色更改为灰色(我成功了),并将活动/选定页面或悬停页面的颜色更改为黄色(我不能这样做)。这是我使用的代码。我不确定如何找到可以更改的导航栏元素的名称,以便更改导航栏。

---
title: "Example"
output: 
  flexdashboard::flex_dashboard:
    vertical_layout: fill
---
<style>                     
.navbar {
  background-color:grey;
  hover-color:yellow;
}

</style> 
Run Code Online (Sandbox Code Playgroud)

背景显示为灰色(就像我想要的那样),但我悬停在所选页面或页面上的页面保持蓝色。有谁知道如何处理这个问题?非常感谢!

css r r-markdown flexdashboard

1
推荐指数
1
解决办法
1347
查看次数

将操作按钮与 R flexdashboard 一起使用

是否可以在 R flexdashboard 中使用操作按钮?

例如,在下面的代表中,是否可以添加一个按钮,以便代码仅在显示按钮时运行?

我在网站上找不到文档https://garrettgman.github.io/rmarkdown/flexdashboard/using.html#html_widgets

谷歌处理的大部分信息都是在“纯粹”的闪亮应用程序中使用操作按钮而不是flexdashboard。

---
title: "example"
runtime: shiny
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
---

```{r setup, include=FALSE}
library(flexdashboard)
```

Column {data-width=100}
-----------------------------------------------------------------------

### Chart A

```{r}
numericInput("n1", "First number", 10)  


```

Column {data-width=900}
-----------------------------------------------------------------------

### Chart B

```{r}

DT::renderDataTable({
  

x = sample(1:input$n1, size=500, replace=TRUE)
x= as.data.frame(x)

  DT::datatable(x, options = list(
    bPaginate = FALSE
  ))
})


```
Run Code Online (Sandbox Code Playgroud)

r shiny flexdashboard

1
推荐指数
1
解决办法
2147
查看次数

将 HTML 和 javascript 代码添加到 R 中的 flexdashboard

我有以下创建 Flexdashboard 的代码:

---
title: "Untitled"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    runtime: shiny
---

```{r setup, include=FALSE}
library(flexdashboard)
Run Code Online (Sandbox Code Playgroud)

我想插入一些 HTML 和 javascript 代码。我试过这个

    Column
    -----------------------------------------------------------------------

    ### Block 1

    ```{r}
    <p>"This is a paragraph"</p>
    <script>
      alert("This is an alert")
    </script>
    ```
Run Code Online (Sandbox Code Playgroud)

但这不起作用。请问您能帮我解答这个问题吗?谢谢。

html r flexdashboard

1
推荐指数
1
解决办法
1694
查看次数

更新到R版本3.4.2后,pandoc文档转换失败,错误1

更新到R版本3.4.2后,我的flexdashboard文档闪亮不再起作用.

即使我尝试运行该示例的副本https://jjallaire.shinyapps.io/shiny-biclust/
我得到了

'错误:pandoc文档转换失败,错误1'

.

到目前为止,我在网络搜索期间找不到该错误的答案.我还更新了所有包裹.

我的sessionInfo:

R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Austria.1252  LC_CTYPE=German_Austria.1252    LC_MONETARY=German_Austria.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Austria.1252    

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] biclust_1.2.0    lattice_0.20-35  colorspace_1.3-2 MASS_7.3-47     

loaded via a namespace (and not attached):
 [1] flexclust_1.3-4   Rcpp_0.12.13      digest_0.6.12     rprojroot_1.2     jsonlite_1.5      backports_1.1.1  
 [7] stats4_3.4.2      magrittr_1.5      evaluate_0.10.1   stringi_1.1.5     rpart_4.1-11      rmarkdown_1.7    
[13] flexdashboard_0.5 tools_3.4.2 …
Run Code Online (Sandbox Code Playgroud)

r shiny flexdashboard

0
推荐指数
1
解决办法
6079
查看次数

hw_grid 小部件功能在 flexdashboard 中不起作用

由于这个问题,我想将 6 个highcharter图表排成一行,就像这里一样。似乎在外面工作得很好flexdashboard

data(diamonds, package = "ggplot2")
diamonds <- diamonds[-6]

map(names(diamonds), function(x){
  diamonds[[x]] %>% 
    hchart(showInLegend = FALSE) %>% 
    hc_add_theme(hc_theme_smpl()) %>% 
    hc_title(text = x) %>% 
    hc_yAxis(title = list(text = ""))
  }) %>% 
  hw_grid(rowheight = 225, ncol = 3)  %>% browsable()
Run Code Online (Sandbox Code Playgroud)

请在此处找到一个简单的示例,了解它如何在以下范围内不起作用flexdashboard

---
title: "test"
runtime: shiny
output:
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill
---
```{r}
library(highcharter)
library(data.table)
library(ggplot2)
library(htmltools)
```


### trying to render with hw_grid

```{r}
sliderInput('ncol','ncol',min = 1,max=4,value = 2)
``` …
Run Code Online (Sandbox Code Playgroud)

shiny htmlwidgets flexdashboard r-highcharter

0
推荐指数
1
解决办法
1264
查看次数