get_flextable {shinySbm} | R Documentation |
get_flextable
Description
A fct that build a flextable from an sbm object
Usage
get_flextable(
sbm,
labels = "default",
type = c("blockProp", "connectParam", "storedModels"),
settings = list()
)
Arguments
sbm |
an sbm model product of sbm estimation (simple or bipartite) |
labels |
labels for nodes. If it's simple sbm it should be a single character ("default" -> c("nodes")). If sbm is bipartite a named character (names are row and col) ("default" -> c(row = 'row', col = 'col')). |
type |
the type of table wanted. |
settings |
a list of settings |
Details
Values of type
'blockProp': gives the block proportions.
'connectParam': gives the block connectivity.
'storedModels': gives the stored modems summary.
The list of parameters settings
for the flextable
"caption": Caption is the flextable title (character)
"digits": nb of digits wanted to be shown in the table
"selected_col": Color highlighting the selected model
"best_col": Color of text for the best model
Value
Return the selected flextable
Examples
# my_sbm <- sbm::estimateBipartiteSBM(sbm::fungusTreeNetwork$fungus_tree,
# model = 'bernoulli')
my_sbm <- FungusTreeNetwork$sbmResults$fungus_tree
get_flextable(my_sbm,
labels = c(row = "Fungus", col = "Trees"),
type = "blockProp"
)
get_flextable(my_sbm,
labels = c(row = "Fungus", col = "Trees"),
type = "connectParam", settings = list(digits = 5)
)
get_flextable(my_sbm,
labels = "default",
type = "storedModels", settings = list(caption = "New Title")
)