Posts

Showing posts with the label shiny

Shiny app: No error reported, but why the VAR6A_2 is empty?

Shiny app: No error reported, but why the VAR6A_2 is empty? Hey I have a question with shiny. After I click on 'Run App", no error is reported, but the tabpanel VAR 6A_2 is empty.. I tried the code outside the app, the code works. But after I move the code inside the app, no result is showed. So confusing. Another question is, I need to create more than 30 tabpanels for the app. Each tabpanle has one variable. What makes thing complicated is, for some of the variables, they are computed with their above variables. For example, Var 4 is computed from Var 2 and Var 3. Here I store all the variables in one app. It is a little confusing because there are so many variables. Is there a better way to organize them? Thanks a lot. Here is the code, thanks. library(shiny) library(plotly) #library(d3heatmap) library(dplyr) #library(ggplot2) #library(ggthemes) #library(gplots) library(readxl) library(tidyr) #source('./utils.R') Index_2 <- read_xlsx('Index 2.xlsx') Index...

Hide the filters in Shiny DT datatable

Image
Hide the filters in Shiny DT datatable In my shiny app I'm creating a datatable using the DT package. I have column filters enabled, however, I want to hide the row of filter boxes. I have separate shiny widgets outside of the datatable which will act as the filters and pass them to the datatable through the searchCols option. Disabling column filters would hide the row of filter boxes but then the searchCols option doesn't work. When I run the app and inspect the elements, I see that the row I want to delete is called < tr role="row">...< /tr>. If I right click it and click "Delete element", the row disappears and the datatable looks like I want it to, with the outside filters working as intended. I can also accomplish that by adding "display:none" to the element.style css. My question is how do I tell the app to delete this row when the datatable is rendered? I'm not sure what kind of reproducible code I could provide, but h...

How to sync ShinyApps with MySQL From Localhost to Public

How to sync ShinyApps with MySQL From Localhost to Public I am currently developing an app using R Shiny and finishing my ShinyApps, now I am trying to deploy the apps to Shinyapps.io so multiple user can reach and use it, but I have an issue for the deployment. my Apps is about a Pharmacy management, it controls a CRUD operation, so clearly it is binded with db Connection using these options configuration (running this in locally) options(mysql = list( "host" = "127.0.0.1", "port" = 3306, "user" = "root", "password" = "" )) one more thing, to connect to database, I usually started my XAMPP apps and switched on mysql admin so my apps can connect the database locally. it worked flawlessly and clear before deploy but it crashed instantly when I try to run it in the shiny.io after delpoy (what I mean is disconnected automatically ). so I did try to change the host ip to publically like this , (I am trying to get ip add...