Open oliverbott opened 9 years ago
I believe I can just type in n1
which is the name of the figure.
The result is blank which probably means an error in the code...
Take a look at this:
http://rpubs.com/conniez/ufo_rchart
I think you might want to do something like
n1$show('iframesrc', cdn = TRUE)
Thanks I´ll look into this
It seems that for interactive rCharts to show up in the output, it is necessary to simply add this code chunk (no changes needed) to the .Rmd file:
## load the package
library(rCharts)
## utility function to add required assets such as CSS and JS libraries
add_lib_assets <- function(lib, cdn = F, css = NULL) {
assets = get_assets(get_lib(lib), cdn = cdn)
if (!is.null(css)) {
assets$css = c(assets$css, css)
}
styles <- lapply(assets$css, function(style) {
sprintf("<link rel='stylesheet' href=%s>", style)
})
scripts <- lapply(assets$jshead, function(script) {
sprintf("<script type='text/javascript' src=%s></script>", script)
})
cat(paste(c(styles, scripts), collapse = "\n"))
}
# get assets from online repositories
add_lib_assets("NVD3", cdn = TRUE, css = "http://rawgithub.com/ramnathv/rCharts/master/inst/libraries/nvd3/css/rNVD3.css")
I found this hint on http://rstudio-pubs-static.s3.amazonaws.com/9331_9b5778029d1e46d0b3afcf1d861d7e70.html.
It works for me, hope this helps others too!
That's really helpful. Thanks for posting.
Hi everyone, we are having problems with visualizing our rChart data output in R. Our code can be found (and run) on https://github.com/oliverbott/Final_Project/blob/master/Data/Follower_Selection.R. The
nPlot
code is taken from http://ramnathv.github.io/rCharts/, which has some amazing visualizations.How can I view the actual output? What am I doing wrong?
Thanks a lot for your
help
!