Shiny

How to change a plot when hovering over elements in Shiny?

杀马特。学长 韩版系。学妹 提交于 2021-02-18 08:11:12
问题 I am searching for a solution to change a plot in a Shiny app when the user is hovering over a hyperlink in the same panel. Here is a simple example: library(shiny) words <- sort(sapply(1:50, USE.NAMES = F, FUN = function (x) paste(sample(letters, 15), collapse = "")), decreasing = T) dat <- data.frame(words, f = sort(rgamma(50, shape = 5, scale = 1))) ui <- pageWithSidebar( headerPanel("Playground"), sidebarPanel(), mainPanel( uiOutput("links"), plotOutput("out.plot") ) ) server <- function

How to change a plot when hovering over elements in Shiny?

你。 提交于 2021-02-18 08:11:07
问题 I am searching for a solution to change a plot in a Shiny app when the user is hovering over a hyperlink in the same panel. Here is a simple example: library(shiny) words <- sort(sapply(1:50, USE.NAMES = F, FUN = function (x) paste(sample(letters, 15), collapse = "")), decreasing = T) dat <- data.frame(words, f = sort(rgamma(50, shape = 5, scale = 1))) ui <- pageWithSidebar( headerPanel("Playground"), sidebarPanel(), mainPanel( uiOutput("links"), plotOutput("out.plot") ) ) server <- function

Add a new row with the existing data frame in shiny R by using action button

让人想犯罪 __ 提交于 2021-02-18 08:08:26
问题 I am building a shiny form which will take data from the textInput field and combined those input with a text file (which will be uploaded by file input) and show the output in the main panel. There is an action button to update the data for the first time (take the data from text input and merge with the processed text file) and I added another action button for add new data (the purpose of this Add new data to add a new set of data as row with the existing one, The new set of data will be

Html output to display the the description of each function

萝らか妹 提交于 2021-02-17 04:56:12
问题 I am trying to build a r shiny app where the user will get to know about each function in just a click. For this I have coded below in R . But print(??input$A) is not working. Could anyone help please library(shinydashboard) library(readxl) out <- data.frame(baseFns = ls('package:base')) ui <- dashboardPage( dashboardHeader(title = "Loading data"), dashboardSidebar(sidebarMenu( menuItem("Analysis", tabName = "Analysis", icon = icon("chart-bar")) )), dashboardBody( tabItems(tabItem(tabName =

ERROR:`data` must be a data frame, or other object coercible by `fortify()`, not an S3 object with class reactiveExpr/reactive

大城市里の小女人 提交于 2021-02-17 02:01:06
问题 I am trying to build a Corona Dashboard. Where If someone selects State from the dropdown, District wise cases to be displayed in the graph. E.g. If someone selects Gujarat, it shows district wise cases in Bar chart. Someone change it to Maharashtra, It should update with the district of Maharashtra. But I am getting "ERROR: data must be a data frame, or other object coercible by fortify() , not an S3 object with class reactiveExpr/reactive " error. library(shiny) library(readxl) library

R trycatch() in place with err and warn handlers but Shiny still crashes?

给你一囗甜甜゛ 提交于 2021-02-16 13:53:22
问题 To reproduce: #app.R library(shiny) library(RODBC) savefunc <- function() { conn <- odbcConnect(...) #put in a conn string u know works df = data.frame(testing=c("testing")) columnTypes = list(testing="varchar(128)") tryCatch( { sqlSave(conn, dat=df, tablename ="...", #put in a pre-existing tbl rownames = FALSE, colnames = FALSE, append=TRUE, varTypes=columnTypes) }, err=function(errorCondition) { cat("in err handler") message(errorCondition) }, warn=function(warningCondition) { cat("in warn

Expand/Collapse Shiny selectInput function

我的梦境 提交于 2021-02-16 09:01:52
问题 I would like to find a resource that would allow my Shiny selectInput function to expand/collapse based on the category headings that I have created. I have searched through some bootstrap resources, but am not yet successful. Please forgive my minimal working example, I acknowledge that there may be more efficient ways to provide a MWE. Thanks for any advice you can offer. library(shiny) library(tidyverse) #create a quick dataset to plot schools <- as.data.frame(table( c('Adams', 'Van Buren'

Expand/Collapse Shiny selectInput function

那年仲夏 提交于 2021-02-16 08:59:45
问题 I would like to find a resource that would allow my Shiny selectInput function to expand/collapse based on the category headings that I have created. I have searched through some bootstrap resources, but am not yet successful. Please forgive my minimal working example, I acknowledge that there may be more efficient ways to provide a MWE. Thanks for any advice you can offer. library(shiny) library(tidyverse) #create a quick dataset to plot schools <- as.data.frame(table( c('Adams', 'Van Buren'

adding data input into a empty data frame in R using shiny

梦想与她 提交于 2021-02-11 18:21:47
问题 I am fairly new to shiny and R I am trying to make a user interface for the amount of money used in different companies. I made a empty data frame, and was trying to add the input from the user to the data frame, but the app crashes. Any assistance would be great please! library(shiny) df <- data.frame(Company = character(), Goods = character(),GoodsType = character(), Number = integer(), Cost = double(), stringsAsFactors = FALSE) ui <- fluidPage( titlePanel("Cost tool "), sidebarLayout(

adding data input into a empty data frame in R using shiny

别等时光非礼了梦想. 提交于 2021-02-11 18:21:07
问题 I am fairly new to shiny and R I am trying to make a user interface for the amount of money used in different companies. I made a empty data frame, and was trying to add the input from the user to the data frame, but the app crashes. Any assistance would be great please! library(shiny) df <- data.frame(Company = character(), Goods = character(),GoodsType = character(), Number = integer(), Cost = double(), stringsAsFactors = FALSE) ui <- fluidPage( titlePanel("Cost tool "), sidebarLayout(