'Crosstalk Output Variables R

Looking for some specific help with Crosstalk without use of Shiny. Two things; First is get a slider select with one value instead of a range. Second is how to extract a selection from a filter_ object as a output variable. Below is some code for you to try. I want to take the value from the user selection and use it in another process. This value is not in the original table so not filterable as such. It is used calculated dynamically based on what the user selects. so if they select 0.002 I need to grab that as a variable.

library(crosstalk)

band<-data.frame(seq(0.001,0.5,0.001))

colnames(band)<-c("width")

bd<-SharedData$new(band)

bscols(
    filter_slider(
    id="Bandwidth",
    label="3.) Select a heat map bandwidth",
    step=0.001,
    sharedData= bd,
    column=~width,
    min=0.0010, max=0.0500) 
)

Any thoughts? Happy to provide more detail if required.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source