This a test Rpubs document to help figure out how to publish an Rmd document that includes the rCharts. I am using Rstudio Version 0.98.1091. I submitted a new issue where we can discuss possible solutions. If you have any suggestions let me know and I will add them to this Rpubs file.

Relevant issues submitted to rCharts github repo

Below is a simple example using Rickshaw library taken from here.

require(rCharts)
Loading required package: rCharts
#specify the data
data1 = data.frame(
  c( 0, 1, 2, 3 ),
  c( 40, 49, 17, 42 ),
  stringsAsFactors = FALSE
)
colnames(data1) <- c("x","y")
#build the plot
r1 <- Rickshaw$new()
r1$layer(
  y ~ x,
  data = data1,
  type = "area",
  colors= "steelblue",
  height = 240,
  width = 540
)
#turn off all the nice built in features
#to match the sparse first example
r1$set(
  hoverDetail = FALSE,
  xAxis = FALSE,
  yAxis = FALSE,
  shelving = FALSE,
  legend = FALSE,
  slider = FALSE,
  highlight = FALSE
)
# r1$show(T) works locally
# r1$save('test.html', cdn = T) works as well after launching a local web server

It works locally when using r1$show(T) or r1$save('test.html', cdn = T). However, when trying to publish to Rpubs using official guidlines either the chart does not show or errors arise during the knit2html process.

r1$show('iframe', cdn = TRUE) # gives the following error

# Error in r1$show("iframe", cdn = TRUE) : object 'opts_current' not found
# Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> <Anonymous>
# Execution halted
r1$show('iframesrc', cdn  = TRUE) # chart shows up on Rpubs but not in Rmd preview
r1$show('inline', include_assets = TRUE, cdn = TRUE)
r1$print('chart1', include_assets = TRUE, cdn = TRUE)
# both give the following error

# pandoc: Could not find data file //cdn.strategiqcommerce.com/ajax/libs/rickshaw/1.2.1/rickshaw.min.css
# Error: pandoc document conversion failed with error 97
# Execution halted