Strange Error Happening with Tibble in Shiny with Highcharter

Hi Y'all,

I am building a shiny app, which lives in dev right here. The public error message can be seen on the "Prevention" Tab under "Working Age -> Policy & Clinical Care".

The issue appears to be with this tibble that I manually created:

prevention <- tibble(year = c('2011','2012','2013','2014','2015','2016','2017','2018'),
pct =  c(.318,.291,.310,.338,.383,.331,.318,.222)) 

I use this tibble to create this chart on a shiny app, which actually draws the chart if I run the code below on its own.

prevention %>%  
      hchart("line", hcaes(x=year, y=pct)) %>% 
      hc_title(text="Flu Vaccination Coverage for Texans Aged 18-64, by Year") %>% 
      hc_subtitle(text="Shown: The Estimates % of Population Aged 18-64 Reporting 'Yes' to 'Flu Shot in the Past year?'")

However, when I put this inside of a shiny highcharter object and call on that same highchart object in the UI of the shiny, app, I get this error code from this part of the shiny app:

2020-10-19T16:25:02.939867+00:00 shinyapps[2841071]: Warning: Error in : Problem with `mutate()` input `x`.
2020-10-19T16:25:02.939871+00:00 shinyapps[2841071]: ℹ Input `x` is `year`.
2020-10-19T16:25:02.939869+00:00 shinyapps[2841071]: ✖ Input `x` must be a vector, not a function.
2020-10-19T16:25:02.944813+00:00 shinyapps[2841071]:   132: <Anonymous>

Has anyone seen something like this with a tibble, where it thinks the column 'year' is a function?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.