You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
When passing a mapping column from a reactive dataset (via shiny) into ggvis an error occurs saying that the object (mapping column) is not found, here is an example:
shiny server
shinyServer(function(input, output){
# set up reactive dataselectedData<- reactive({
mtcars$multiply_mpg<-mtcars$mpg*input$multiplymtcars$id<-1:nrow(mtcars)
return(mtcars)
})
# set up hover displaydisplay<-function(x){
if(is.null(x)) return(NULL)
tmp<- selectedData()
return_val<-tmp[tmp$id==x$id, 1]
return(return_val)
}
#set up ggvisselectedData %>% ggvis(x=~cyl, y=~multiply_mpg, key:=~id) %>% layer_boxplots() %>%
layer_points() %>%
add_tooltip(display, "hover") %>%
bind_shiny("ggvis")
})
placing "key := ~id" inside layer_points() fixes the issue but is this expected? Intuitively I would think that placing a mapping id in ggvis() would be passed to all subsequent layers.
The text was updated successfully, but these errors were encountered:
When passing a mapping column from a reactive dataset (via shiny) into ggvis an error occurs saying that the object (mapping column) is not found, here is an example:
shiny server
shiny ui
run shiny app with ggvis input
warning produced is:
Warning: Error in eval: object 'id' not found
Stack trace (innermost first):
107: eval
106: eval
105: prop_value.prop_variable
104: FUN
103: lapply
102: apply_props.data.frame
101: apply_props
100: eval
99: eval
98: do_.grouped_df
97: do_
96: dplyr::do
95: apply_props.grouped_df
94: apply_props
93: reactive reactive({
apply_props(parent_data(), props)
})
82: data_table[[id]]
75: shiny::isolate
74: FUN
73: lapply
72: static_datasets
71: as.vega.ggvis
70: as.vega
69: reactive reactive({
as.vega(visf(), session = session, dynamic = TRUE, ...)
})
58: r_spec
51: shiny::isolate
50: exec_connectors
49: bind_shiny
48: function_list[[k]]
47: withVisible
46: freduce
45: _fseq
44: eval
43: eval
42: withVisible
41: %>%
40: server [/Users/zskidmor/Desktop/test/server.R#21]
1: shiny::runApp
Error in eval(expr, envir, enclos) : object 'id' not found
placing "key := ~id" inside layer_points() fixes the issue but is this expected? Intuitively I would think that placing a mapping id in ggvis() would be passed to all subsequent layers.
The text was updated successfully, but these errors were encountered: