View source: R/rescaleNetwork.R
rescaleNetwork | R Documentation |
Normalize network coordinates to the unit cube while maintaining its geography.
rescaleNetwork(x, method = "global2")
x |
[ |
method |
[
Default is |
[Network
]
## Not run:
library(gridExtra)
x = generateClusteredNetwork(n.points = 100L, n.cluster = 4L, name = "Rescaling Demo")
# here we "stretch" the instance x direction to visualize the differences of
# the rescaling mehtods
x$coordinates[, 1] = x$coordinates[, 1] * 10L
x$upper = x$upper * 10L
pls = list(
autoplot(x) + ggtitle("Original"),
autoplot(rescaleNetwork(x, method = "by.dimension")) + ggtitle("By dimension"),
autoplot(rescaleNetwork(x, method = "global")) + ggtitle("Global"),
autoplot(rescaleNetwork(x, method = "global2")) + ggtitle("Global2")
)
pls$nrow = 1L
do.call(grid.arrange, pls)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.