Question

I like to create bunch of googleVis charts and one I create the charts, I like to create a different html files with custom names so that I can reference them in my front page with divs.

For example, I am doing this:

x <- gvisTable(mtcars)
writeLines(x, "cars.html")

I get this error:

Error in writeLines(x, "cars.html") : invalid 'text' argument

Ideas how would I address this problem?

Was it helpful?

Solution

I got the answer, I can simply to this and write it to any html file I like:

cat(x$html$chart, file="tmp.html")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top