Pregunta

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?

¿Fue útil?

Solución

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")
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top