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
0
votes
1 answer

Apply two crosstalk filters to two data frames in R

I am trying to develop an interactive dashboard of my office's antimicrobial usage. Basically, I want to create two graphs (one that shows data by quarter, the other that shows data by month) that can be filtered on the antimicrobial group and the…
0
votes
0 answers

How to add css to shiny.tags object in R

I am trying to understand how to add the css options from the filter_slider function in crosstalk package in R to a shiny.tags object. Here is a reproducible example: library(crosstalk) sd <- SharedData$new(mtcars) my_tags <-…
Alanq
  • 121
  • 3
  • 10
0
votes
1 answer

Why is the standard deviation mismatched in barplot when I am using plotly and crosstalk

I want to produce barplot using plotly and crosstalk, but I found that in the plot, the standard deviations are mismatched. I don't understand the reason. Here is my demo data: library(plotly) library(crosstalk) BPData <- data.frame( Metabolite =…
Wang
  • 1,314
  • 14
  • 21
0
votes
0 answers

accessing the selected value from filter_select or sharedData object crosstalk R

I want to be able to use the selected value from a crosstalk::filter_select in the title of a plot that is based on the sharedData. Here is a minimal example of what I am after (except instead of "x" in the title it is the filtered…
0
votes
0 answers

Setting column widths using bscols in crosstalk package

I have the following simple example of using bscols method (bootstraps columns) as part of the crosstalk package in R. While setting widths = c(6, 6) works, it seems to set the default column sizes as col-xs-6 I'm wondering how to customize this,…
DiamondJoe12
  • 1,879
  • 7
  • 33
  • 81
0
votes
0 answers

Is there a way to select the order of crosstalk filter options?

Can you select the order of your options in a crosstalk filter? filter_select() in a flexdashboard crosstalk::filter_select( id = "Indicator", label = "Indicator", sharedData = shared_df, group = ~Indicator, multiple = FALSE) where Indicator has…
lilblue
  • 84
  • 7
0
votes
0 answers

Solution to Ampersand (&) issue in crosstalk and flexdashboard?

Ampersand (and sign) (&) turning to "&[amp;]" (I've added in square brackets so you can see it on stack overflow). I'm using crosstalk filters in a flexdashboard. One of the options in my crosstalk filter has an ampersand (&) in the name. When I…
lilblue
  • 84
  • 7
0
votes
0 answers

Can you merge a large spatial polygon data frame and a non spatial df? leaflet

I'm trying to merge a Large SpatialPolygonsDataFrame with a non spatial dataframe. Using packages leaflet, sp. I used read_OGR to read in the shapefiles. I'm getting this Error "cannot get a slot ("Polygons") from an object of type "NULL"" when…
lilblue
  • 84
  • 7
0
votes
0 answers

How to use select filters for reactable objects in R shiny when the underlying data can be changed dynamically?

I have an R shiny app where I want to display a table as a reactable object. There I want to have a filter functionality that provides more functionality than the standard filters for reactable objects that appear when I set filterable = TRUE in…
jfiedler
  • 43
  • 4
0
votes
1 answer

How to order checkbox options from crosstalk?

I'm using checkbox filters from crosstalk to filter a reactable table. By default, the checkboxes are ordered alphabetically. I want to override this, and sort by e.g. number of entries, or by factor level. Here's a silly example: Below, I've got a…
Ulrik Lyngs
  • 98
  • 1
  • 5
0
votes
1 answer

How do I make filter_slider() a single value slider?

Consider this very simple data and code: library(crosstalk) dat<-data.frame(Year=c(81,82,83,84,85,86,87), Sorrow=c(0,1,2,3,4,5,6)) shared_dat<-SharedData$new(dat) filter_slider("Year","Year",shared_dat,~Year) Using this code, we end…
Pake
  • 968
  • 9
  • 24
0
votes
0 answers

Is there a way to manually add a horizontal line to a plotly bargraph using the crosstalk package?

I am trying to add a horizontal line to each state based on each state's unique Murder rate. Here is my attempted code. Unfortunately, I am not open to using other functions like Shiny because essentially I would like to create an html output from R…
0
votes
1 answer

Increase the maximum number of choices in filter_select() in crosstalk in R

I want to create a dropdown menu with the crosstalk package. My data has about 2000 choices. But with the filter_select() function only 1000 choices are possible. Can this limit be increased to 2000? library(crosstalk) df <- data.frame(g = seq(1,…
fg123
  • 1
0
votes
1 answer

R: Make boxplot using crosstalk and ggplot2, box plot color is lost

I would like to make box plot using crosstalk, ggplot2 and plotly. But I encountered 2 issues: the fill color is lost in the box plot I cannot remove the All option in the dropdown menu. Below is my demo code. Thanks a lot for your help. sd =…
Wang
  • 1,314
  • 14
  • 21
0
votes
1 answer

How to conditionally set plotly axis range for a shared data set

I've built an R flexdashboard and am using an htmlwidget, crosstalk, to filter my dashboard's plotly charts. My current issue is that data labels for a horizontal bar chart are being cut off. I'm trying to remedy this by adjusting the x-axis max.…
bbroxler
  • 145
  • 7