ululalbab / google-motion-charts-with-r

Automatically exported from code.google.com/p/google-motion-charts-with-r
0 stars 0 forks source link

gvisTable output commented? #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by bsg...@gmail.com on 17 Jun 2014 at 10:19

GoogleCodeExporter commented 9 years ago
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)

Original comment by bsg...@gmail.com on 17 Jun 2014 at 10:29

GoogleCodeExporter commented 9 years ago
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.

Original comment by bsg...@gmail.com on 17 Jun 2014 at 10:56

GoogleCodeExporter commented 9 years ago
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

Original comment by markus.g...@googlemail.com on 18 Jun 2014 at 6:37

GoogleCodeExporter commented 9 years ago
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

Original comment by markus.g...@googlemail.com on 18 Jun 2014 at 6:37