0

I recently updated ggvis and I am now getting an error when I use filter in one of my plots. The error is:

"Error in filter(., area %in% eval(input_checkboxgroup(unique(rel_data$area),  : (list) object cannot be coerced to type 'double'"

My code looks like this:

rel_data %>% ggvis(x = input_select(subject_names, map = as.name, 
                   label = "X Axis"), 
                   y = input_select(subject_names, map = as.name, 
                   label = "Y Axis")) %>%
 filter(area %in% eval(input_checkboxgroup(unique(rel_data$area), 
        selected = "Gut")))

Here's a reproducible example:

names = c("Bacilli", "Actinobacteria", "area")
b_counts <- c(1,5,8,100,34)
a_counts <- c(1,3,11,55,67)
area <- c("Gut", "Skin", "Gut", "Gut", "Skin")
rel_data <- data.frame(b_counts, a_counts, area)
names(rel_data) <- names

library(ggvis)

rel_data %>% ggvis(x = input_select(names(rel_data[,-3]), map = as.name, label = "X Axis"), 
               y = input_select(names(rel_data[,-3]), map = as.name, label = "Y Axis")) %>%
  filter(area %in% eval(input_checkboxgroup(unique(rel_data$area), selected = "Gut")))
Jack Simpson
  • 1,681
  • 3
  • 30
  • 54
  • Could you provide a reproducible example? –  Mar 02 '15 at 08:41
  • Thanks for the suggestion, just added it to the question. – Jack Simpson Mar 03 '15 at 01:39
  • it works fine in my setup (R 3.1.2, ggvis 0.4.0.900) – hrbrmstr Mar 03 '15 at 12:36
  • That's strange, I'm running R 3.12 as well and I've checked that all my packages are up to date (I even removed and reinstalled ggvis). I still can't get it to work - are you working on Linux/Windows? I'm on Mac Yosemite so I wonder if that's where the problem is coming from. – Jack Simpson Mar 03 '15 at 22:50
  • Any chance of finding out which OS you're using? I'm really hoping to narrow it down to a Yosemite bug. – Jack Simpson Mar 05 '15 at 23:05

0 Answers0