analyze_network: Network analysis using k core decomposition

View source: R/network-kanalysis.R

analyze_networkR Documentation

Network analysis using k core decomposition

Description

This function performs the kcore decomposition of a bipartite network. The input is the interaction matrix in a .csv file, with the format of www.web-of-life.es Species of guild a are distributed by colums, and those of guild b by rows. First colum contains the labels of guild b nodes, and first row, the labels of guild a. If the interaction matrix is binary, the cell of species_a_m,species_b_n will be set to 1. If it is weighted, to a real number different of 0.

Usage

analyze_network(namenetwork, directory = "", guild_a = "pl",
  guild_b = "pol", plot_graphs = FALSE, only_NODF = FALSE)

Arguments

namenetwork

is the file name that contains the interaction matrix

directory

where the network file is stored

guild_a

prefix for the guild of nodes stored in rows

guild_b

prefix for the guild of nodes stored in columns

plot_graphs

plot kshell histogram and kamada kawai plots

only_NODF

just compute the NODF measurement of nestedness

Value

calc_values a list containing the following objects

  • "graph" an igraph::graph object

  • "max_core" maximum k shell index

  • "nested_values" a list containing all the values provided by the bipartite::nested function, unless only_NODF set TRUE

  • "num_guild_a" number of nodes of guild a

  • "num_guild_b" number of nodes of guild b

  • "links" number of network links

  • "meandist" network average kradius

  • "meankdegree" network average kdegree

  • "spaths_mat" matrix with node to node shortest distance paths

  • "matrix" adyacency matrix with nodes of guild a by columns and guild b by rows

  • "g_cores" list with the value of kshell for each node

  • "modularity_measure" value of igraph::modularity function

Examples

result_analysis <- analyze_network("M_PL_007.csv", directory = "data/", guild_a = "Plant", guild_b = "Pollinator")

jgalgarra/kcorebip documentation built on Jan. 12, 2024, 11:47 p.m.