renderGvis in r markdown to shiny

120 views
Skip to first unread message

Eason Jostad

unread,
Jul 27, 2015, 9:37:48 PM7/27/15
to Shiny - Web Framework for R
I am using the New -> R Markdown... choice in R Studio and then choosing the Shiny option.  I can't seem to get renderGvis to render when I click "Run Document"   Do I need to alter a config file somewhere to get the googleVis library to be available?  


```{r, include=FALSE}


#  load packages

library(RODBC)
library(googleVis)


theQuery = #functioning sql Query here.  this is working correctly

chartData = sqlQuery(channel, theQuery);

odbcCloseAll()


```



```{r, echo=FALSE}

renderGvis({
    
    df = data.frame(HE = chartData$HE, dHat = chartData$dHat)
    
    Line = gvisLineChart(df)
    plot(Line)
  
})

```

I get an output in the "Run Document" output that looks like this:


## function () 
## {
##     chart <- func()
##     paste(chart$html$chart, collapse = "\n")
## }
## <environment: 0x0000000009c1ef68>


But no graph.  Let me know what you think, Thankya.

E

Eason Jostad

unread,
Jul 30, 2015, 9:18:32 AM7/30/15
to Shiny - Web Framework for R

--
You received this message because you are subscribed to a topic in the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shiny-discuss/LEQbsZh24Jc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/fe9397ec-e34a-4374-9211-5a7f798144f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages