Loading...
 
Skip to main content

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" }


        

History

Information Version
Mon 23 of Dec, 2013 20:05 GMT-0000 Xavier de Pedro added example of heatmaps 14
Mon 23 of Dec, 2013 17:21 GMT-0000 Xavier de Pedro fixing rr section 13
Thu 19 of Dec, 2013 11:57 GMT-0000 Xavier de Pedro more examples 12
Thu 19 of Dec, 2013 11:39 GMT-0000 Xavier de Pedro new url 11
Thu 19 of Dec, 2013 11:37 GMT-0000 Xavier de Pedro added info about sharing with plot.ly 10
Thu 19 of Dec, 2013 11:25 GMT-0000 Xavier de Pedro changed for plot.ly based charts 9
Thu 19 of Dec, 2013 00:21 GMT-0000 Xavier de Pedro added some extra check 8
Wed 18 of Dec, 2013 14:36 GMT-0000 Xavier de Pedro updated 7
Wed 18 of Dec, 2013 14:33 GMT-0000 Xavier de Pedro changed chart 6
Fri 11 of Oct, 2013 09:28 GMT-0000 Xavier de Pedro fixed iframe src path for Tiki12 5
Fri 31 of May, 2013 10:09 GMT-0000 Xavier de Pedro replaced some explicit code sections with the param echo=1 4
Sat 25 of May, 2013 12:22 GMT-0000 Xavier de Pedro added lattice 3
Fri 10 of May, 2013 15:21 GMT-0000 Xavier de Pedro updated 2nd chart 2
Fri 10 of May, 2013 15:20 GMT-0000 Xavier de Pedro first version 1