Loading...
 
Skip to main content

History: Profile_r_test9_rcharts_xcharts

Source of version: 1 (current)

Copy to clipboard
            {RR(echo="1" cacheby="pagename")}
# Testing rCharts from http://ramnathv.github.io/rCharts/
if(!require(devtools)){ install.packages("devtools", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }
require('devtools', quietly = TRUE ) 
if(!require(rCharts)){ install_github('rCharts', 'ramnathv') }

# This example will use functions from package reshape2, so we install it if needed
if(!require(reshape2)){ install.packages("reshape2", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }
require(reshape2)
uspexp <- melt(USPersonalExpenditure)
names(uspexp)[1:2] = c("category", "year")
x1 <- xPlot(value ~ year, group = "category", data = uspexp, type = "line-dotted")
#x1$print("chart4")

x1$LIB[2] <- "http://{{domain}}/rcharts_libraries/xcharts"
x1$save("x1.html")
{RR}

{CODE()}
{iframe name="myChart" width="850" height="500" align="middle" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" src="temp/cache/{{domainslash_if_multitiki}}R_{{page}}/x1.html"}
{CODE}

{iframe name="myChart1" width="850" height="500" align="middle" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" src="temp/cache/{{domainslash_if_multitiki}}R_{{page}}/x1.html"}