popsNetwork {IFC} | R Documentation |
IFC_pops Network Display
Description
Builds and displays populations network.
Usage
popsNetwork(
obj,
hierarchical = TRUE,
color_mode = "white",
highlight = NULL,
seed = NULL,
direction = "LR",
weighted = TRUE,
...
)
Arguments
obj |
an 'IFC_data' object extracted with features extracted. |
hierarchical |
whether to display network using a hierarchical layout or not. Default is TRUE. |
color_mode |
Whether to extract colors from 'obj' in "white" or "black" mode. Default is "white". |
highlight |
population to permanently highlight. If found in 'obj', this population will be displayed with its color. Default is NULL. |
seed |
If you provide a seed manually, the layout will be the same every time. Default is NULL. |
direction |
The direction of the hierarchical layout. Default is 'LR'. |
weighted |
whether to scale population's node size according to count. Default is TRUE. |
... |
other argument to be passed. |
Value
a visNetwork object.
Examples
if(requireNamespace("IFCdata", quietly = TRUE)) {
## use a daf file
file_daf <- system.file("extdata", "example.daf", package = "IFCdata")
daf <- ExtractFromDAF(fileName = file_daf)
popsNetwork(obj = daf)
} else {
message(sprintf('Please run `install.packages("IFCdata", repos = "%s", type = "source")` %s',
'https://gitdemont.github.io/IFCdata/',
'to install extra files required to run this example.'))
}