I have been trying to publish an rChart into my blog using the knit2wp
function. However, locally I can get the chart to render but when I publish it the chart becomes just text…
I have a Rmd file that goes like this:
library(rCharts)
r1 <- rPlot(mpg ~ wt, data = mtcars, type = 'point')
r1$print('inline', cdn = TRUE,include_assets = TRUE)
or
r1$print('iframesrc', cdn = TRUE)
To publish I use this:
knit2wp('test.Rmd',
title = 'test',
options(WordPressLogin = c(LOGIN = 'PASS'),
WordPressURL = 'https://dadosdadosdados.wordpress.com/xmlrpc.php'),
shortcode = c(TRUE, TRUE),
publish = F)