Learn R Programming

edgebundle (version 0.4.2)

tnss_smooth: Smooth a Steiner tree

Description

Converts the Steiner tree to smooth paths

Usage

tnss_smooth(g, bw = 3, n = 10)

Value

data.frame containing the smoothed paths

Arguments

g

Steiner tree computed with tnss_tree

bw

bandwidth of Gaussian Kernel

n

number of extra nodes to include per edge

Author

David Schoch

Details

see see online for tips on plotting the result

Examples

Run this code
xy <- cbind(state.center$x, state.center$y)[!state.name %in% c("Alaska", "Hawaii"), ]
xy_dummy <- tnss_dummies(xy, root = 4)
gtree <- tnss_tree(cali2010, xy, xy_dummy, root = 4, gamma = 0.9)
tree_smooth <- tnss_smooth(gtree, bw = 10, n = 10)

Run the code above in your browser using DataLab