Chargement...
 
Imprimer

r_demo09_rcharts_rickshaw

{RR(echo="1" cacheby="pagename")}

  1. 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') }

  1. 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)
usp = reshape2::melt(USPersonalExpenditure)

  1. get the decades into a date Rickshaw likes

usp$Var2 <- as.numeric(as.POSIXctusp$Var2, "-01-01"?)
p4 <- Rickshaw$new()
p4$layer(value ~ Var2, group = "Var1", data = usp, type = "area", width = 560)

  1. add a helpful slider this easily; other features TRUE as a default

p4$set(slider = TRUE)

  1. p4$print("chart6")

p4$LIB2 <- "http://wiki.zollet.fr/rcharts_libraries/rickshaw"
p4$save("p4.html")
{RR}

{iframe name="myChart" width="850" height="500" align="middle" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" src="temp/cache/R_r_demo09_rcharts_rickshaw/p4.html"}

Erreur Plugiciel en attente d'approbation

Ce plugiciel a été ajouté/modifié récemment. Son exécution ne sera pas possible avant que l'éditeur de site ne valide ces paramètres.