Questions tagged [shinyjs]

1

votes
0

answer
63

Views

how to browse multiple files and select any of them through dropdown in R?

I was trying to browse multiple files and show the list of uploaded files in dropdown box but on selecting any option I am not able to generate its data. I know this is because I am not reading csvs and I don't know how to link that file with its data. Please guide me on this. data_sets
Avi R
1

votes
1

answer
113

Views

Remove the text in a shiny::textInput field on mouse click event

I have a simple textInput: textInput(inputId = 'input1', h4('Name'), value = 'Your name') How can I set an onclick event so that the text completely disappears when the user clicks on the text field? Is this possible via shinyjs::onclick?
wipuyotu
1

votes
0

answer
36

Views

Is it possible to read values from database table like MySQL and update it dynamically in shiny app data table

Can we read the table from database like Mysql, which updates based on submit button and again have to read it and display it in shiny application without rerunning again?
rock4sridhar
1

votes
1

answer
64

Views

Shiny app : `shinyjs` parse error, but script works as `script` tag

I made a simple Shiny app with a video stream (if it works, using the laptop camera ). The entire Javascript is: const player = document.getElementById('player'); const constraints = { video: true }; // Attach the video stream to the video element and autoplay. navigator.mediaDevices.getUserMedia(co...
Remko Duursma
1

votes
1

answer
103

Views

Render output only when conditionalPanel conditions satisfied

I am writing a Shiny app that will be deployed across various users with screen resolutions ranging from 720p to 1080p. The application will be deployed on the web. My page has a simple sidebar and a main content area. In order to adjust the width of the sidebar (to contain all the contents without...
Faaiz Ajaz
1

votes
1

answer
133

Views

Show/Hide entire box content with RadioButton Shiny

I have 3 boxes in the dashboard body. When radioButton in selected to 'P3G', box1 and box3 should appear i.e hide box2. When radiobutton is selected to 'Chose File', box2 and box3 should appear. I have the below code using shinyjs but it is not working as required i.e. not hiding complete box conten...
chas
1

votes
0

answer
20

Views

make conditionalPanel appears when RData file is loaded in shinydashboard

I am making a shiny app that interacts with a big data.frame that I have stored as an RData file. I want the user to select the file, and once the RData is completely loaded (takes ~15 seconds) a second panel should show up allowing the user to input some sample name and do some operations. Here is...
user2380782
1

votes
0

answer
21

Views

Next and previous button for material_tabs in shinymaterial

Currently I'm creating a shiny web application with Shinymaterial package that comes with tabs on the interface. But what my issue is if I could make a NEXT and PREVIOUS button on each tab to allow users to move to the next and previous tab. I know this could be done by using Shinydashboard but cou...
Kaiwen Teoh
1

votes
1

answer
56

Views

R Shiny - Refresh app session (shinyjs.reset) when navigating to a specific navbarPage tab

My app progresses through a series of panels, where the user can progress to the next panel by clicking an action button. I would like the entire app to refresh when navigating to another tab. This means the user will start back at the first in a series of panels, and any widget inputs will have bee...
pienkowski
1

votes
0

answer
54

Views

shiny - collapse sidebar while using appendTab

I try to collapse the sidebar in the new tab once one of the marker in the example is clicked. Sidebar should stay in Main Dashboard tab Little example app with data library(shiny) library(leaflet) library(shinydashboard) library(purrr) library(shinyjs) pts
CER
1

votes
0

answer
38

Views

Copy and paste text in selectizeInput in a Shiny application

I have a selectizeInput UI object in my Shiny app and I would like to be able to copy and paste a comma-delimited list of inputs (i.e. copy from and paste to the selectizeInput). At the moment I can copy the comma-delimited list of inputs (i.e. A, B, C, D) from elsewhere and then paste it in my sele...
maos.a
1

votes
0

answer
32

Views

How to print active tabPanel with both plot and datatable in R Shiny?

I am trying to print active tabPanel as what it appears on the screen with a print button in shiny. The tabPanel can contain various plots and datatables. I made a reproducible example below, and problems with the following code are that the datatable loses its format when printing and that it ca...
B. Lin
1

votes
1

answer
32

Views

R shiny - last clicked button id inside shiny module function

I am trying to access the last clicked checkbox or button id from inside a Shiny module. I have found the great response from this post helpful: R shiny - last clicked button id and have adapted the code to my question. I also took a hint from this post: https://github.com/datastorm-open/visNetwork/...
amycookie
1

votes
2

answer
2k

Views

Modify shiny action button once it is clicked

I have the following in server.R shinyServer(function(input, output) { # builds a reactive expression that only invalidates # when the value of input$goButton becomes out of date # (i.e., when the button is pressed) ntext
Sam Kingston
1

votes
1

answer
133

Views

Shiny server: Track when user navigates from app

I have a shiny dashboard app running on the open source shiny server which opens in a browser. The users then provide a username and password in order to view their respective dashboards. I would like to know when a user navigates away from the page or closes the browser window. I know I can use shi...
rookieJoe
1

votes
1

answer
121

Views

rcytoscapejs: varying parameters- 'renderGraph' function unavailable

I need to allow users to upload a file to define a network being rendered in an app. I would like to vary the parameters to re-render an interactive shiny graph that is deployed via a special shiny github package- 'rcytoscapejs': https://github.com/cytoscape/r-cytoscape.js/tree/master While the grap...
johnny utah
1

votes
1

answer
2.6k

Views

Changing font size and color in Shiny R doesn't work?

I am trying to change the font size and color of a siderbarPanel with ID: test_type using the code below (in ui.r) and it doesn't work? tags$head(tags$style('#test_type{color: red; font-size: 20px; font-style: italic; }' ) ) Any idea?
Harriss
1

votes
1

answer
146

Views

Reset ratingInput in shiny app

I want to use a rating Input in conjunction with the shinyjs::reset()function. Everthing works fine except the reset functionality. Any hints? Here is my minimal example: library(shiny) devtools::install_github('stefanwilhelm/ShinyRatingInput') library(ShinyRatingInput) library(shinyjs) ui
sammerk
1

votes
1

answer
310

Views

How to dynamically append a string text to the body of a shiny app?

I am trying append a reactive text (the color name from selectInput) to the body of a shiny app after tags$h3. I guess this is more a jquery issue, but right now it keeps adding the selected color rather than displaying the string 'reactively'. What I would like instead is to have the string inside...
Dambo
1

votes
1

answer
81

Views

how to control the update propagation order in shiny

Hi I would like to send a 'false' input update from the server side AFTER some calculations. In other words, I would like to control the order of the output update propagation. For example , in the script below I need to update output$text after the Sys.sleep in the 2nd observeEvent : library(shiny...
Vincent Guyader
1

votes
2

answer
825

Views

Can you use shinyjs to hide/show whole panels?

I'm wondering if it would be possible to use the shinyjs hide and show functions on an entire shiny wellPanel? I'm interested in doing so to conditionally show one of two panels and from what I can tell I cannot use a reactive value in the condtional for a conditionalPanel. Below is an example of w...
Sam-U_L-L-L
1

votes
1

answer
344

Views

Shiny R: Change border color of selectInput

I am creating a rather reactive app that has a few numericInput variables and some selectInput variables. As the variables are quite many and they are used to estimate interventions, I am introducing colours to denote those variables that are different from the default. I have already implemented t...
Manos C
1

votes
1

answer
506

Views

Disable action button when textinput is empty in Shiny app [R]

I'm building a shiny app in which a query from textInput is made when the user clicks on the 'search' action button. I'd like that button to be disabled if the textInput box is empty. I'm using shinyjs::toggleState() here, but I can't figure out what logic it needs to apply to see that the text box...
Phil
1

votes
1

answer
882

Views

Collapse (close) Menu in SidebarMenu of Shinydashboard on button click

I am working in an application similar to one below. I have my input panel in sidebar under a menu which is initally expanded. I want to collapse the menu and hide all the input panel so that my sidebar will be clean. But It should appear when I expand (not permanently hide). I tried the following s...
TheRimalaya
1

votes
1

answer
595

Views

Search Bar and Web page retrieval in R shiny box

Please check the snapshot below. I want to enter the url of any website in the search bar in the left box and the webpage can be displayed real time in the right box. The command 'searchInput' I used is a shinyWidget and does not fulfill this. Please help me with a fix here. Also I would like to giv...
Adam Shaw
1

votes
1

answer
52

Views

shinyjs::enable UI widget on shiny app launch

I'm using shinyjs to enable and disable a UI widget (inputId='check_buttons'). Currently the widget is only enabled after the user clicks to go button (input$go). Is it possible to have the UI widget check_buttons enabled be default when the app is launched? observeEvent(input$go, { shinyjs::enable...
spies006
1

votes
1

answer
680

Views

Highcharter - Click event to filter data from graph

I am using highcharterand I want to be able to add a click event to my graph that when I click on a bar (whether its top level or drilldown), it filters the data table below it to contain the same information. I've checked this SO question which shows how to implement the the Java to R to contain a...
Kevin
1

votes
1

answer
39

Views

use pre assigned variable inside R shiny function as a parameter

I am creating a survey using R shiny and have the following function at the beginning of my Shiny App: install.packages('devtools') spotifydata
Gabriel
1

votes
1

answer
225

Views

How to add floating button in shinydashboard

I am working on something where I need a floating button in shinydashboard. Below is a code to get a floating button using shinyMaterial package. library(shiny) library(shinymaterial) # Wrap shinymaterial apps in material_page ui
kawsleo
1

votes
1

answer
81

Views

How to Disable Plot Clicking in R+Shiny

I have a plot that I want to be clickable until a button is clicked. shinyjs::disable does not appear to do the trick. Is there a way to do this. Minimum Working Example library(shiny) ## ui.R ui
Jordan
1

votes
1

answer
172

Views

Autoclose date range input shiny

I want the date picker to autoclose after a date is selected. I know how to do it when the daterangeinput is rendered directly in the ui but not when it is created in the server. Here is my code. library('shiny') js_string
maRmat
1

votes
1

answer
142

Views

Why different Shiny UI packages cannot be integrated within each other?

Canned packages in Rshiny gives a stock appearance for any basic Rshiny apps. More advanced user probably opt HTML Templates. The canned packages I came across for Rshiny UI are Shiny Dashboard, Shiny Material Design and Flex dashboard. But, why it is not possible to call a Dashboard page and then h...
user5249203
1

votes
1

answer
69

Views

Placeholder in DT::dataTable search bar

I need some help to something I thought will be easy. I have a DT::dataTable and I like to just put a placeholder in the search bar but I can't see where the option for this is.
rcd92
1

votes
1

answer
118

Views

How to create a highcharter event function to create a “dropdown function” in Shiny R

I'm building a shiny app and one of the things I want to accomplish is to create a dropdown menu. I want to plot the labour variable as a function of the year variable for the different levels. See below for a sample dataframe: year level_2 level_3 labour 1 2013 10 101 1 2 2014...
Liri
1

votes
1

answer
265

Views

Shiny: How to initialize empty reactiveValues with an actionButton?

Background: In my app, I have built a pop-up modal wherein users can define variables/parameters and they're subsequently stored in a reactiveValues() once an actionButton is pressed. This appears to work fine. The problem: I have a separate actionButton which is supposed to clear/empty the reactive...
Ray
1

votes
1

answer
49

Views

Can the shiny input read back the values loaded from .Rdata?

Please run the app and would request to put something in the respective inputs. Then please save the object. You would find a .Rdata file saved in your working directory. Here is my problem which I am unable to figure out. In the below application can shiny input (e.g. input$name, input$age, input$l...
ARIMITRA MAITI
1

votes
1

answer
0

Views
1

votes
1

answer
0

Views

R shiny app, making a log that scrolls down automatically

I am trying to make a log in shiny, which text is taken from a reactive value updated by a function. The log is in a verbatimTextOutput and I want it to be scrolled down each time it is updated. For this purpose I use a function using a javascript code I found here, but it does not work when used im...
Ganthark
3

votes
1

answer
177

Views

Problem when reloading an animated GIF in Chrome

I have an app that reloads an animated gif. It works all the time in Safari and intermittently in Chrome. I believe the problem is similar to one mentioned here. My knowledge of Javascript is negligible. However, reading this, I came up with this example, which still doesn't work. Using Chrome, if y...
ixodid
1

votes
1

answer
584

Views

How to see if a shiny dashboard box is collapsed from the server side

I'm trying to find a way to check whether a Shiny Dashboard Box is collapsed or expanded. By reading the great reply by @daattali in How to manually collapse a box in shiny dashboard I know it is possible to collapse the box from the server side by using the shinyjs package, as illustrated in the c...
Jeppe S.

View additional questions