mapperEdges: mapperEdges function

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mapperEdges.R

Description

The input to this function is a TDAmapper class object and the output is a data frame of edges that can be used as input to the networkD3 plot utility.

Usage

1

Arguments

m

An object of class TDAmapper that is the output of the mapper function.

Value

A data frame describing the edges in the graph of the mapper output.

Author(s)

Paul Pearson, pearsonp@hope.edu

References

https://github.com/paultpearson/TDAmapper

See Also

mapperVertices

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
X <- data.frame( x=2*cos(0.5*(1:100)), y=sin(1:100) )
f <- X$y
m1 <- mapper(
       distance_matrix = dist(X),
       filter_values = f,
       num_intervals = 10,
       percent_overlap = 50,
       num_bins_when_clustering = 10)

pt_labels <- 1:length(f)
vertices <- mapperVertices(m1, pt_labels)
edges <- mapperEdges(m1)

# interactive plot
forceNetwork(Nodes = nodes, Links = links,
            Source = "Linksource", Target = "Linktarget",
            Value = "Linkvalue", NodeID = "Nodename",
            Group = "Nodegroup", opacity = 0.8,
            linkDistance = 10, charge = -400)

## End(Not run)

paultpearson/TDAmapper documentation built on May 24, 2019, 10:34 p.m.