Domanda

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?

È stato utile?

Soluzione

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")
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top