mastering-shiny | Mastering Shiny : a book | Data Visualization library
kandi X-RAY | mastering-shiny Summary
kandi X-RAY | mastering-shiny Summary
This is the work-in-progress repo for the book Mastering Shiny by Hadley Wickham. It is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mastering-shiny
mastering-shiny Key Features
mastering-shiny Examples and Code Snippets
Community Discussions
Trending Discussions on mastering-shiny
QUESTION
I have a scatterplot in a shiny dashbaord and would like to generate two different tables by selecting/highlighting different areas of the scatterplot. I am currently able to generate a single table by selecting/highlighting an area, however am not sure how to make this work for two tables/selections (or if that is even possible).
Any help or advice would be greatly appreciated. Thankyou
Sample code to generate a shiny dashboard with a scatterplot and highlight/generate a single table is provided below (and was taken from here)
Some more detail : Ideally this process would be achieved by manually selecting/dragging an area over some points, generating the first table and then manually selecting/dragging an area over a different subset of points and generating the second table. After this, if another area is selected, it resets the first selection and table and then the next selection would reset the second selection and table.
...ANSWER
Answered 2021-Jun-08 at 02:12Maybe this might be helpful. You can track which table (1 or 2) in reactiveValues
as well as the data for each table. Let me know if this is what you had in mind. If you wanted to maintain the previous selection in the plot, I would think you may need to manually place a rectangle. A github issue allowing for multiple selections of brushed points is an open issue (enhancement). Alternatively, you could tag points for each table based on this approach.
QUESTION
I am following the examples from this website here on R shiny: https://mastering-shiny.org/action-graphics.html
I copied and pasted the following code from the website:
...ANSWER
Answered 2021-Mar-19 at 17:15We need to execute the ui, server in shinyApp
QUESTION
I am currently creating a Shiny app which should build plots according to user input. The user can choose between histograms, density and scatter plots, which variables to depict and what titles/labels to display. Since this is Shiny, I tried to follow the instructions given in https://mastering-shiny.org/action-tidy.html which explain how to use tidy evaluation in this context.
I create a basic plot object with ggplot(..., aes(rlang::.data[[]]))
and add the geoms later on. Unfortunately, I then encounter the following error message on trying to display the plot:
ANSWER
Answered 2021-Mar-09 at 10:28You appear to be a victim of tidyverse's non-standard evaluation (NSE).
Roughly speaking, tidyverse functions expect tibble coilumns as arguments. You're passing characters from the input
list.
Using, for example,
QUESTION
I have a set of data with different date ranges for different locations. I would like my date range widget to update the minimum and maximum dates after selecting a location with the select box widget.
I have tried the steps mentioned in https://mastering-shiny.org/action-dynamic.html#hierarchical-select and have modified it for the date range widget but it does not seem to be working. I have included a reprex below where the start date doesn't seem to update after selecting locations B or C but not A.
...ANSWER
Answered 2020-Jun-03 at 13:25The problem seems to be with setting min
/start
or max
/end
at the same time. You have to ensure that start
and end
both lie within the range [min
and max
] at all times. The easiest way to do this was to split the update into stages:
- Set
min
andmax
to the earlest and latest dates in the whole dataset - Set
start
andmin
to earliest and latest dates at the current location - Set
min
andmax
to the earliest and latest dates at the current location
I combined 1 and 2 in a single call to updateDateRangeInput
.
It's messy, but it seems to work.
I changed the structure of your reactives slightly whilst investigating whether there was priority issue with their updates. Here's the whole server function.
QUESTION
I'm trying to create a dynamic UI, so i used this code
...ANSWER
Answered 2020-Feb-26 at 16:25The %||%
comes from rlang
. You can find it on the ?"op-null-default"
help page. From the documentation
This infix function makes it easy to replace NULLs with a default value. It's inspired by the way that Ruby's or operation (||) works.
Basically it returns the second value if the first is NULL.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mastering-shiny
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page