Description Usage Arguments Value Examples
Calculate degree, betweenness, and closeness scores for each node in network (igraph), excluding MDM taxa at each rank, and store results in a dataframe. 7 dataframes are returned as output, 1 for each rank. Nodes are represented by row. Each column represents a separate network centrality measure.
1 | get_degree_df_wo_unk(graph_wo_unk)
|
graph_wo_unk |
List of 7 graphs, each only including known taxa for that taxonomic rank (from Kingdom to Species), produced by get_graph_wo_unk function. |
Returns List of 7 dataframes of degree, betweenness, and closeness scores for all nodes in network.
df1 |
Dataframe of nodes with known Kingdom network measure scores |
df2 |
Dataframe of nodes with known Phylum network measure scores |
df3 |
Dataframe of nodes with known Class network measure scores |
df4 |
Dataframe of nodes with known Order network measure scores |
df5 |
Dataframe of nodes with known Family network measure scores |
df6 |
Dataframe of nodes with known Genus network measure scores |
df7 |
Dataframe of nodes with known Species network measure scores |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(graph_wo_unk){
met_degree_df_wo_unk_l = list()
for(i in 1:length(graph_wo_unk)){
graph_tax_level = names(graph_wo_unk)[[i]]
print(graph_tax_level)
graph = graph_wo_unk[[i]]
graph_degree_df <- degree_calc_f(graph)
met_degree_df_wo_unk_l[[graph_tax_level]] = graph_degree_df
}
return(met_degree_df_wo_unk_l)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.