flexdashboard

How to use updateSelectInput in flexdashboard?

巧了我就是萌 提交于 2019-12-24 12:34:59
问题 I'd like to change values of an inputbox based on another inputbox. With R Shiny there is a method available: updateSelectInput. But I'm not sure how to use it in flexdashboard. 回答1: This is quite late but also quite possible. If this is your first selectInput() raw_data <- mpg selectInput( "manufacturer", label = "Select manufacturer", choices = c("All", sort(unique(raw_data$manufacturer))) ) You can try either of these approaches. This one is overall less code: renderUI({ df <- raw_data %>%

R - knitr:kable - removing individual headers and adding single header on multiple columns

谁说我不能喝 提交于 2019-12-24 08:02:05
问题 R code in Rmarkdown file: col1 <- c("dummydata","dummydata","dummydata") col2 <- c("dummydata","dummydata","dummydata") col3 <- c("dummydata","dummydata","dummydata") col4 <- c("dummydata","dummydata","dummydata") col5 <- c("dummydata","dummydata","dummydata") col6 <- c("dummydata","dummydata","dummydata") col7 <- c("dummydata","dummydata","dummydata") col8 <- c("dummydata","dummydata","dummydata") df1 <- data.frame(col1,col2,col3,col4,col5,col6,col7,col8) kable(df1, format="html",table.attr=

Flexdashboard, rhandsontable: how to programmatically access user updated table?

心已入冬 提交于 2019-12-23 05:47:16
问题 Not a Shiny programmer. Simple question. rhandsontable in Flexdashboard app. How to access a column updated by the user? Sample code: --- title: "Test" runtime: shiny output: flexdashboard::flex_dashboard: orientation: columns vertical_layout: fill --- ```{r setup, include=FALSE} library(flexdashboard) library(shiny) require(dplyr) require(tidyverse) require(rhandsontable) hour <- 1:24 required <- c(2, 2, 2, 2, 2, 2, 8, 8, 8, 8, 4, 4, 3, 3, 3, 3, 6, 6, 5, 5, 5, 5, 3, 3) required <- as.integer

Deploy Rmarkdown web app on server

假装没事ソ 提交于 2019-12-23 05:16:37
问题 I have developed a web application(flexdashboard) in runtime shiny by importing excel data into rmarkdown. I want to deploy it on a server which should work in real time i.e;i will share the link with users so that the end users can see what is happening in real time and the changes that are made to the data in excel data would also be reflected in the web app i.e; dashboard. Please let me know on how to deploy this Rmarkdown web app on Linux server (or any cost efficient server)? Also please

How to extend the renderTable width in Shiny flexdashboard

自古美人都是妖i 提交于 2019-12-22 04:54:10
问题 I have the following self containing Shiny-Flexdashboard: --- title: "FOO" runtime: shiny output: flexdashboard::flex_dashboard: vertical_layout: scroll orientation: rows theme: default --- ```{r setup, include=FALSE} library(flexdashboard) library(tidyverse) ``` Rows ------------------------------------- ### Statistical Test Summary ```{r stat_test_table} mainPanel( renderTable( { dat <- df <- structure(list(`Sample name` = structure(1:3, .Label = c("Sample1", "Sample2", "Sample3"), class =

Shiny: Gauge from flexdashboard in Shiny App

独自空忆成欢 提交于 2019-12-21 17:13:13
问题 Is it possible to embed the gauge from flexdashboard (picture below) in Shiny App ( shinydashboard or shiny )? The example code within a Shiny flexdashboard from the flexdashboard website: ```{r} renderGauge({ rate <- computeContactRate(input$region) gauge(rate, min = 0, max = 100, symbol = '%', gaugeSectors( success = c(80, 100), warning = c(40, 79), danger = c(0, 39) )) }) ``` Here is my failed attempt: library(shiny) library(shinydashboard) #library(flexdashboard) ui <-dashboardPage(

Shiny: Gauge from flexdashboard in Shiny App

蹲街弑〆低调 提交于 2019-12-21 17:09:44
问题 Is it possible to embed the gauge from flexdashboard (picture below) in Shiny App ( shinydashboard or shiny )? The example code within a Shiny flexdashboard from the flexdashboard website: ```{r} renderGauge({ rate <- computeContactRate(input$region) gauge(rate, min = 0, max = 100, symbol = '%', gaugeSectors( success = c(80, 100), warning = c(40, 79), danger = c(0, 39) )) }) ``` Here is my failed attempt: library(shiny) library(shinydashboard) #library(flexdashboard) ui <-dashboardPage(

How to render flexdashboard from the command line?

空扰寡人 提交于 2019-12-19 09:02:45
问题 I have a flexdashboard Rmd that renders correctly when i press the Knit button in RStudio. I would like to render it from the command line but the naviagation bar does change when I use the command render("myfile.rmd", flex_dashboard()) The heading of my Rmd file is the following: --- title: "Flexdashboard" output: flexdashboard::flex_dashboard: theme: cosmo navbar: - { title: "Draft-For Internal Use Only", align: right } source_code: embed --- 回答1: You can call render with no arguments and

facet_grid in Shiny flexdashboard giving error “Faceting variables must have at least one value”

扶醉桌前 提交于 2019-12-18 07:04:51
问题 I am having some trouble getting a ggplot2 facet_grid plot working for an evaluation system. The plot renders well but I get the following error in the browser and console: Error in : Faceting variables must have at least one value This occurs every time I switch the brand entry based on the input input$brand . The application doesn't crash but the error message is annoying. I have prepared this reproducible example: --- title: "Power ranking for mtcars" runtime: shiny output: flexdashboard:

How to combine row and column layout in flexdashboard?

风格不统一 提交于 2019-12-17 17:38:19
问题 For a new project I want to try the new flexdasboard package. I am thinking of a lay out in which the column and row orientation is somehow combined. The layout I am thinking of is something like this: If I change this code: --- title: "Focal Chart (Left)" output: flexdashboard::flex_dashboard --- Column {data-width=600} ------------------------------------- ### Chart 1 ```{r} ``` Column {data-width=400} ------------------------------------- ### Chart 2 ```{r} ``` ### Chart 3 ```{r} ``` into