Learn R Programming

matie (version 1.2)

fdg: Force directed graph visualization of associations between all pairs of variables.

Description

Constructs and draws a force directed graph using an "all pairs" association matrix to drive attraction in the graph. This adjacency matrix can represent linear or non-linear associations.

Usage

fdg(dataSet, dataName, method, cutoff, dim)

Arguments

dataSet
a data frame
dataName
a string naming the dataSet. (set to NULL if unknown)
method
one of "A" for non-linear associations or "Rsq" for linear associations. Defaults to "A".
cutoff
a real number between 0 and 1, used to remove edges from the graph with association < cutoff. Defaults to 0.1
dim
graph layouts can be generated in 2 or 3 dimensions. note that rgl must be installed for viewing 3 dimensional layouts.

Value

Returns nothing.

Details

The igraph package is used to generate, layout and display the force directed graph. The layout employed is layout.kamada.kawai.

References

Discovering general multidimensional associations, http://arxiv.org/abs/1303.1828

See Also

ma cor agram

Examples

Run this code
    data(baseballData)
    fdg(baseballData,dataName="baseballData",method="A",cutoff=0.35,dim=2)
    
    # if you have rgl available then try dim=3 
    # fdg(baseballData,dataName="baseballData",method="Rsq",cutoff=0.15,dim=3)

Run the code above in your browser using DataLab