Skip to content

Tag: r

Dynamically load data into rmarkdown html output

Is there a way to have the data associated with and html output file generated via Rmarkdown be loaded dynamically (e.g., via javascript or ajax) when opening the html output? For instance, I have this simple Rmarkdown file which produces a plot (in svg) and a table: Is there a way to feed the data to the htm…

Shiny Custom Hoverable Dropdown

In my app I would like to have a custom html button as a dropdown menu. I want to have the selected option as an input$ variable. It shall then be printed to the console. With my code I am able to detect the click but instead of printing e.g. Link 1 it returns just an empty string. Answer You

Communicate from JS to Shiny in a module

I want to set an input element from the JS side and react upon it from the Shiny side. Shiny.setInputValue(<name>, <val>) does that for me. However, I want to listen to that element from within a module, which makes that I have to namespace <name>, which makes it a bit difficult. I found the…

Display variable names when hovering a scatter plot

Here’s a plot made with {echarts4r} that comes from this answer on GitHub: As you can see, the name of the car model and the values are displayed when you hover a point. However, I don’t know how to display the variable names in the same way. I know I could manually replace “x-axis” an…