D3 Scatterplot Matrices

Creates an interactive scatterplot matrix using the D3 JavaScript library. See < https://d3js.org/> for more information on D3.


D3 Scatterplot Matrices

Travis-CI Build Status CRAN_Status_Badge

This is a port of Mike Bostock's D3 scatter plot matrix code to the htmlwidgets framework. There have been some minor adjustments, including the addition of tooltips.

You could also consider the pairedVis() function in the healthvis package.

Take it for a test run here (you can upload your own data).

Installation

The pairsD3 package is available on CRAN:

install.packages("pairsD3")

Alternatively, you can install the development version of pairsD3 from Github using the devtools package as follows:

devtools::install_github("garthtarr/pairsD3")

Usage

A canonical example with the iris data:

data(iris)
require(pairsD3)
pairsD3(iris[,1:4],group=iris[,5])

Save

Use savePairs to save a pairs plot as a stand alone HTML file:

library(magrittr)
pairsD3(iris[,1:4],group=iris[,5]) %>% savePairs(file = 'iris.html')

Shiny

You can view an interactive scatterplot matrix using the shinypairs function:

shinypairs(iris)

Rmarkdown

You can include interactive scatterplot matrices in rmarkdown documents in the usual way:

```{r}
require(pairsD3)
pairsD3(iris)
```

Slidify

HTML widgets are not (yet) supported in slidify. A workaround is to do save the widget as a webpage then include that webpage in slidify using an iframe:

```{r, results='asis',echo=FALSE}
require(pairsD3)
pd3 = pairsD3(iris)
savePairs(pd3, 'pD3.html')
cat('<iframe src="pD3.html"> </iframe>')
```

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("pairsD3")

0.1.3 by Garth Tarr, 4 years ago


https://github.com/garthtarr/pairsD3/


Browse source code at https://github.com/cran/pairsD3


Authors: Garth Tarr [aut, cre] , Mike Bostock [aut, cph] (d3.js library and much of pairsD3 code in htmlwidgets/lib , https://d3js.org)


Documentation:   PDF Manual  


GPL (>= 3) license


Imports htmlwidgets, shiny

Suggests knitr


See at CRAN