Skip to content
Advertisement

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 html file so

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

How to use the localStorage option for DT in R Shiny?

I want to design a shiny app that allow the users to save their inputs in the local storage, which means when the users reopen the tool with their web browsers, the tool reload the values last time the users provide. This is mainly achieved by the shinyStore package. Below is an example. So far I can use the shinyStore

Use lasso instead Rectangle for select reign in Leaflet

I am trying to show a leaflet map using R(I can not use Shiny package). I use a ‘DT’, ‘crosstalk’ and ‘leaflet’ packages to calculate the mean of a column for selected data in map. In the map, it select the points only by Rectangle shape. Is it possible to select by lasso ? I found leaflet-lasso(Lasso selection plugin (Demo),Jan

How to access user input from radio buttons (made with a JS callback) in shiny DT and have different JS elements in one DT?

I am trying to combine two commonly shared JS callbacks into one R datatable shiny app (having radio buttons (see https://yihui.shinyapps.io/DT-radio/ and Extracting user input values from radio buttons in Shiny DT into a dataframe or list) and having nested rows in a child/parent table (see https://stackoverflow.com/a/56599838/10624798 and many other places). Individually they both work, but not together. I am

framework7: broken tab links after stripping worker IDs from URL

shinyMobile’s inst/framework7-5.7.8/my-app.js file has the following code chunk at the top: It appends a random string (the worker ID) to the URL of the app whenever it is not run locally. E.g., https://my_domain/my_app/ becomes https://my_domain/my_app/_w_123456/. This is super annoying, as it prevents search parameters (e.g., ?param=test) from being consistently captured (screencast video). So, I followed the solution found in this

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 following solution, but I am not

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” and “y-axis” with their names but

How to filter (search) formatted columns in R DT (DataTable)

When applying formatting to a column in DT::datatable(), the DataTables automatic column filter is not working. For example: The filter for column b fails. I think this is a common enough problem that there has to be a solution. I have been searching, but without success so far. Would be grateful if someone points me to where this has been

Advertisement