My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 35: gvisTable output commented?
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Jun 2014


 
Reported by bsg...@gmail.com, Jun 17, 2014
What steps will reproduce the problem?

1. Using example from http://rpubs.com/jeromyanglim/simple_gvisTable_example

2. Code:
    <html>
    <body>
    <!--begin.rcode
    suppressPackageStartupMessages(library(googleVis))
    simpleData <- data.frame(matrix(1:9, nrow=3))
    tab2 <- gvisTable(simpleData, options=list(width = 600, height = 300))
    print(tab2, "chart")
    end.rcode-->
    </body>
    </html>

3. Render in RStudio via the Knit button

What is the expected output? What do you see instead?

Expected page with the formatted table. Instead the code for the table is commented out starting with:
    <div class="output"><pre class="knitr r">## <!-- Table generated in R 3.1.0 by googleVis 0.5.2 package -->
    ## <!-- Tue Jun 17 18:16:38 2014 -->
    ##
    ##
    ## <!-- jsHeader -->
    ## <script type="text/javascript">

Manually removing the ## comment tags allows the page to run.

What version of the product are you using? On what operating system?
R 3.1.0 by googleVis 0.5.2 package, RStudio 0.98.932, Mac OS X 10.9.3

Please provide any additional information below.


Jun 17, 2014
#1 bsg...@gmail.com
The following in an interactive session opens up a browser rendering the table as expected (at http://127.0.0.1:19717/custom/googleVis/TableIDxxxxxxxxx.html

> suppressPackageStartupMessages(library(googleVis))
> simpleData <- data.frame(matrix(1:9, nrow=3))
> tab2 <- gvisTable(simpleData, options=list(width = 600, height = 300))
> plot(tab2)
Jun 17, 2014
#2 bsg...@gmail.com
It looks like using R Markdown instead of HTML and including the "asis" option solves this. Not sure if there is a way to include this option in R HTML.
Jun 18, 2014
Project Member #3 markus.g...@googlemail.com
Indeed, this is the expected behaviour as documented in the vignette and help file of plot.gvis. See also the following blog post: http://lamages.blogspot.co.uk/2012/10/googlevis-032-is-released-better.html
Status: Invalid
Jun 18, 2014
Project Member #4 markus.g...@googlemail.com
Indeed, this is the expected behaviour as documented in the vignette and help file of plot.gvis. See also the following blog post: http://lamages.blogspot.co.uk/2012/10/googlevis-032-is-released-better.html

Powered by Google Project Hosting