tjGCluster: tjGCluster: Trajectory Analysis for Finding the Spine...

Description Usage Arguments Value Author(s) References Examples

View source: R/tjGCluster.R

Description

tjGCluster is used for trajectory analysis. It returns a list including (1) the shortest path for maximum distance positions in the minimum spanning tree (the path of the spine skeleton of minimum spanning tree); (2) the nodes on the spine skeleton; (3) and the minimum spanning tree; (4) the branches of the backbone of the minimum spanning tree. If the input data is an igraph object, the function will return the nodes on the spine skeleton and the minimum spanning tree.

Usage

1
tjGCluster(m, from=NULL, to=NULL, cutoff=26);

Arguments

m

data.frame or matrix of x-coordinate and y-coordinate, or igraph object.

from

start vetex: If from=NULL (the default), the spine skeleton returns, otherwise, the path starts from the given vertex.

to

end vetex: If from=NULL (the default), , the spine skeleton returns, otherwise, the path ends at the given vertex.

cutoff

branch cut-off value: branches will return with vertex number > cutoff.

Value

coord

matrix: the xy-coordinate of the shortest path for maximum distance positions in the minimum spanning tree (the spine skeleton). If some brancches have number of vertices > cutoff, the matrix will also include the xy-coordinate of the branches.

node

the nodes on the spine skeleton.

mst

the minimum spanning tree.

level1

list: branch list on the spine skeleton.

level2

list: branch list on the long branch with vertex number > cutoff.

Author(s)

Ying Hu yhu@mail.nih.gov

Chunhua Yan yanch@mail.nih.gov

Xiaoyu Liang xiaoyu.liang@yale.edu

References

Csardi, G., & Nepusz, T. (2006). The igraph software package for complex network research. InterJournal, complex systems, 1695(5), 1-9.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(i2d_Example,package="i2d")

## Just use 30 points as an example
dat <- i2d(image=i2d_Example, p.n=30)
tj=tjGCluster(dat, from=NULL, to=NULL, cutoff=2)

## Plot the minimum spanning tree
plot(tj$mst)
## Check the nodes on the spine skeleton
tj$node
## Check the shortest path for maximum distance positions in the minimum spanning tree
tj$coord
## Check the branches on the minimum spanning tree
tj$level1
tj$level2

XiaoyuLiang/i2d documentation built on Oct. 20, 2020, 11:05 p.m.