History: Profile_r_test7_plot.ly
Source of version: 3
Copy to clipboard
Testing some nice interactive graphs produced through rNVD3 (D3.js) and PluginR in Tiki. {maketoc title="" levels="2,3"} Testing the interactive graphs produced with rNVD3 {maketoc title="" levels="2,3"} {CODE(colors="r", ln="1", colors="rsplus")} {RR()} # Testing https://github.com/ramnathv/rNVD3 if(!require(rjson)){ install.packages("rjson", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } if(!require(plyr)){ install.packages("plyr", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } if(!require(lattice)){ install.packages("lattice", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } require('rjson', quietly = TRUE); require('plyr', quietly = TRUE); require('lattice', quietly = TRUE); if(!require(devtools)){ install.packages("devtools", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } require('devtools', quietly = TRUE); if(!require(rNVD3)){ install_github('rNVD3', 'ramnathv') } require('rNVD3', quietly = TRUE); hair_eye = subset(as.data.frame(HairEyeColor), Sex == "Female") p1 <- nvd3Plot(Freq ~ Hair | Eye, data = hair_eye, type = 'multiBarChart') p1$chart(color = c('brown', 'blue', '#594c26', 'green')) p1$save('haireye.html') #p1$html('haireye.html') #p1$printChart('haireye.html') {RR} {iframe name="haireye_rNVD3" title="Interactive Charts" width="100%" height="800px" align="middle" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" src="haireye.html"} {CODE} {RR()} # Testing https://github.com/ramnathv/rNVD3 if(!require(rjson)){ install.packages("rjson", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } if(!require(plyr)){ install.packages("plyr", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } require('rjson', quietly = TRUE); if(!require(lattice)){ install.packages("lattice", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } require('rjson', quietly = TRUE); require('plyr', quietly = TRUE); require('lattice', quietly = TRUE); if(!require(devtools)){ install.packages("devtools", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") } require('devtools', quietly = TRUE); if(!require(rNVD3)){ install_github('rNVD3', 'ramnathv') } require('rNVD3', quietly = TRUE); hair_eye = subset(as.data.frame(HairEyeColor), Sex == "Female") p1 <- nvd3Plot(Freq ~ Hair | Eye, data = hair_eye, type = 'multiBarChart') p1$chart(color = c('brown', 'blue', '#594c26', 'green')) p1$save('haireye.html') #p1$html('haireye.html') #p1$printChart('haireye.html') {RR} {iframe name="haireye_rNVD3" title="Interactive Charts" width="100%" height="800px" align="middle" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" src="haireye.html"} And once everything is ready in your system (all packages installed, etc), you'll see something like this: {img src="http://ueb.vhir.org/display981" styleimage="border" } And when you change from "Grouped display" to "Stacked display", you will see a transition of data changing from one display to the other in real time in your browser, ending with this: {img src="http://ueb.vhir.org/display982" styleimage="border" }