This a repeat of a question in the shiny discussion group but probably makes more sense here
I want to hide my code but echo=FALSE does not work for a reactive
```{r, echo = FALSE, message=FALSE}
library(ggplot2)
library(ggvis)
library(dplyr)
selectInput("category", "Choose Dataset:", c("mpg", "disp", "qsec"))
testCode <- max(mtcars$mpg)
# ggvis with dynamically changing columns
reactive({
if (!is.null(input$category))
col <- input$category
else
col <- "mpg"
mtcars %>% ggvis(~mpg, ~disp)
}) %>% bind_shiny('foo')
ggvisOutput('foo')
```
The selectInput and ggvis chart show as required and the testCode line is hidden but I get
## reactive({
## if (!is.null(input$category))
## col <- input$category
## else col <- "mpg"
## mtcars %>% ggvis(~mpg, ~disp)
## })
on the page , which is not desired
TIA