Introduction to Linkspotter"

Introduction

Linkspotter is a package of the R software that mainly allows to calculate and visualize using a graph all the bivariate links of a dataset.

Its main features are:

It also offers a customizable user interface, allowing to:

Available link coefficients are:

Installation

library(devtools)
install_github("sambaala/linkspotter")

Behind a proxy:

library(devtools)
library(httr)
set_config(
  use_proxy(url="<my_proxy>", port=<my_proxy_port>)
)
install_github("sambaala/linkspotter")

Usage

Load the package:

library(linkspotter)

Take a look at the documentation:

help(package="linkspotter")

The examples are carried out using "iris" data.

Calculate the MaxNMI between two variables

maxNMI(iris$Sepal.Length,iris$Petal.Length)

Calculate all link coefficients for all variable couples

corCouples<-multiBivariateCorrelation(iris)
print(corCouples)

Extract a correlation matrix from the correlation dataframe

The Pearson correlation matrix:

corMatrixPearson<-corCouplesToMatrix(x1_x2_val = corCouples[,c('X1','X2',"pearson")])
print(corMatrixPearson)

The MaxNMI matrix:

corMatrixMaxNMI<-corCouplesToMatrix(x1_x2_val = corCouples[,c('X1','X2',"MaxNMI")])
print(corMatrixMaxNMI)

Clustering of variables using a correlation matrix

cl<-clusterVariables(corMatrix = corMatrixMaxNMI)
print(cl)

Visualize the graph using Pearson correlation

linkspotterGraph(corDF = corCouples, variablesClustering = cl, 
  corMethod = "pearson", minCor = 0.25, smoothEdges = FALSE, 
  dynamicNodes = FALSE)

Visualize the graph using MaxNMI

linkspotterGraph(corDF = corCouples, variablesClustering = cl, 
  corMethod = "MaxNMI", minCor = 0.25, smoothEdges = F, 
  dynamicNodes = TRUE)

Launch the customizable user interface

linkspotterUI(dataset = iris, corDF = corCouples, 
  variablesClustering = cl, appTitle = "Linkspotter example")

Additional features

Complete Linkspotter computation:

lsiris<-linkspotterComplete(iris)

Complete Linkspotter computation from an external file:

lsiris<-linkspotterOnFile("iris.csv")
summary(lsiris)
summary(lsiris)

Then launch the user interface using:

lsiris$launchShiny()

Help:

help(linkspotterComplete)

User interface guide

'Graphs' tab

The graph

The variables correspond to the nodes and their links correspond to the edges. Node color depends on the clustering. Edge color depends on the correlation direction quantitative couples (blue: positive correlation, red: negative correlation).

First features

Checkboxes

General information

Click on a graph link

It produces the following:

Link summary figure (bottom right of the graph)

Its type depends on the nature of the corresponding link:

Link summary table (under general information)

It displays all the measurements calculated for the link corresponding to the clicked edge. When at least one of the variables is qualitative, only the MaxNMI has a value.

Click on a node of the graph

It produces the following:

A summary figure for the corresponding variable (bottom left of the graph)

Its type depends on the nature of the corresponding variable:

A summary table for the corresponding variable (under general information)

Its type depends on the nature of the variable:

'Tables' tab

This tab displays 2 tables:

The Correlation coefficient option allows you to choose the coefficient of correlation to be considered among those calculated initially.

Importations

Linkspotter uses and combine features coming from several other R packages, namely infotheo, minerva, energy, mclust, shiny, visNetwork, rAmCharts and ggplot2.



Try the linkspotter package in your browser

Any scripts or data that you put into this service are public.

linkspotter documentation built on July 23, 2020, 5:08 p.m.