Questions tagged [crosstalk]

Use this tag for asking question concerning the Crosstalk R package and cross-widget interactions with htmlwidgets.

Crosstalk

Crosstalk is a package for R that enhances the htmlwidgets package. It extends htmlwidgets with a set of classes, functions, and conventions for implementing cross-widget interactions.

Ressources

91 questions
1
vote
0 answers

Unable to make a filter slider of R with crosstalk

I am attempting to create a slider for the date on the Big Mac Adjusted Index from https://github.com/TheEconomist/big-mac-data/releases/tag/2022-07. The error is in bscols function on R and reads as followed;"Error in sharedData$data(withKey =…
1
vote
1 answer

R: Do you need "js" package to use js in crosstalk filters?

Do you need to have "js" package installed in R to run javascript code chunks in an R flexdashboard using crosstalk? Example code: (taken from another post) --- output: html_document --- ```{r echo=FALSE,…
lilblue
  • 84
  • 7
1
vote
0 answers

How to link two plots in R using Crosstalk and Plotly

I am trying to link two plotly plots in R using Crosstalk. Can someone please tell me why the example below is not working when I try to do a rectangular selection on one of the plots: library(plotly) library(crosstalk) mtcars_sd <-…
Aous Abdo
  • 11
  • 2
1
vote
1 answer

Make selection of plotly appear in a datatable - flexdashboard

I am trying to build a flexdashbaord with two columns, The first one is a simple plot_ly scatter plot. In the second column I want a DT data table that will show the data of the points selected via box or lasso select in the scatter plot as shown in…
DGradeci
  • 39
  • 9
1
vote
1 answer

R flexdashboard crosstalk date filter_slider does not fit in the box

I am having trouble using flexdashboard with crosstalk's filter_slider with dates. It does not seem to fit well in the box in the flexdashboard dashboard (see the image below). Increasing the size of the box does not help as the filter just gets…
Jakub.Novotny
  • 2,912
  • 2
  • 6
  • 21
1
vote
0 answers

R crosstalk: how to set default values in filter_slider() in order to filter date column

My question is similar to this question, which asks how to set default filter selection in crosstalk::filter_select in R. However, I need to do the default select for crosstalk::filter_slider for a date column. I have created a reproducible example…
Jakub.Novotny
  • 2,912
  • 2
  • 6
  • 21
1
vote
1 answer

Crosstalk interactive slider not working with histogram

I want to create an interactive histogram in R using crosstalk. Specifically, I want to use a slider to select what data appears on a histogram. To do so, I used the following code: shared_data <- highlight_key(mpg) widgets <- bscols( widths =…
1
vote
0 answers

How to display large dataset on flexdashboard using crosstalk, filter_select?

I would like to display a map made with ggplot on a flexdashboard page. I am using crosstalk to filter the species I need and plot the corresponding map. However, the ggplotly converter seems to work, the plots are all displayed at once on the…
Nancy
  • 11
  • 2
1
vote
0 answers

R crosstalk filter_select: cannot unselect already selected value

I am trying to use crosstalk to filter a plotly chart. I use crosstalk's filter_select to (un)filter a plotly chart. When using the reprex below trying to select a flower (e.g. setosa), all works fine. But when I unselect the flower, the values are…
Jakub.Novotny
  • 2,912
  • 2
  • 6
  • 21
1
vote
0 answers

Filtering using Crosstalk on a converted time-series ggplot. (no shiny)

I've got a dataset with the following structure (data=historic): structure(list(date = c("23-03-2019", "23-03-2019", "23-03-2019", "23-03-2019", "05-05-2020", "05-05-2020", "05-05-2020", "05-05-2020", "17-06-2021", "17-06-2021", "17-06-2021",…
alec22
  • 735
  • 2
  • 12
1
vote
0 answers

Selecting Reactable Rows via Leaflet Map with Crosstalk

In the code below from https://glin.github.io/reactable/articles/examples.html#cross-widget-interactions, I'd like to be able to highlight the row entry by clicking on the map icon, i.e. the reverse of clicking on the table entry. Is that possible…
Chris
  • 1,449
  • 1
  • 18
  • 39
1
vote
0 answers

Display multiple grouped rows as a search/filter result on R (Using datatables or any alternatives)

A seemingly easy formatting question for datatables, with R. I'd like to return tables/results on my flexdashboard which are formatted slightly different to the default format. I'm not sure if datatables is the best way to do this, but basically I…
kodikai
  • 374
  • 1
  • 10
1
vote
0 answers

How to facet a plot_ly chart within a crosstalk environment

So my question is exactly like this one, except that I'm interested in performing the operation within a crosstalk enabled context. So the complication arises from the fact that the do object doesn't apply to a SharedData object. It sounds like I…
Amit Kohli
  • 2,860
  • 2
  • 24
  • 44
1
vote
1 answer

Shiny with two plotly plots and crosstalk issue

I would like to display data in two plots (plotly) and want to be able to display the selected points of one plot in the other plot by using crosstalk. Sadly nothing I tried is working. The solution with defining the shared data outside the server…
sedsiv
  • 531
  • 1
  • 3
  • 15
1
vote
0 answers

Looping through a SharedData object for plotting addPolylines in Leaflet in R

How do you loop through a SharedData object in order to plot separate addPolylines to a Leaflet map in R? I have dataset with distinct "routes", and I add them one by one in a for loop to not make them connected with each other. Next, I want them…
Soren
  • 17
  • 3