Skip to contents

Summarize mgNetwork properties.

Summarize mgNetworksCollection properties.

Usage

get_network_by_id(ids, as_sf = FALSE, force_collection = FALSE, verbose = TRUE)

get_network_by_id_indiv(id, as_sf = FALSE, verbose = TRUE)

# S3 method for mgNetwork
print(x, ...)

# S3 method for mgNetworksCollection
print(x, ...)

# S3 method for mgNetwork
summary(object, ...)

# S3 method for mgNetworksCollection
summary(object, ...)

Arguments

ids

a vector of Mangal ID for networks (numeric).

as_sf

a logical. Should networks metadata be converted into an sf object? Note that to use this feature sf must be installed.

force_collection

a logical. Should the output to be of class mgNetworksCollection even if it includes only one network.

verbose

a logical. Should extra information be reported on progress?

id

a single ID network (numeric).

x

an object of class mgNetwork or mgNetworksCollection.

...

ignored.

object

object of of class mgNetwork or mgNetworksCollection.

Value

A mgNetwork object includes five data frames:

  • network: includes all generic information on the network (if as_sf=TRUE then it is an object of class sf);

  • nodes: information pertaining to nodes (includes taxonomic information);

  • interactions: includes ecological interactions and their attributes;

  • dataset: information pertaining to the original dataset;

  • reference: details about the original publication.

A summary method is available for objects of class mgNetwork object and returns the following network properties:

  • the number of nodes;

  • the number of edges;

  • the connectance;

  • the linkage density;

  • the degree (in, out an total) and the eigenvector centrality of every nodes.

Functions

  • get_network_by_id_indiv(): Retrieve a network by its collection of networks (default).

Examples

# \donttest{
 net18 <- get_network_by_id(id = 18)
#> Processing id: 18 	1/1  

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Processing id: 4 	1/1  

#>                                                                              

#> Processing id: 4 	1/1  

#>                                                                              

 net18_c <- get_network_by_id(id = 18, force_collection = TRUE)
#> Processing id: 18 	1/1  

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Processing id: 4 	1/1  

#>                                                                              

#> Processing id: 4 	1/1  

#>                                                                              

 nets <- get_network_by_id(id = c(18, 23))
#> Processing id: 18 	1/1  

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Processing id: 4 	1/1  

#>                                                                              

#> Processing id: 4 	1/1  

#>                                                                              

#> Processing id: 23 	1/1  

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Data retrieval 100%   

#>                                                                              

#> Processing id: 8 	1/1  

#>                                                                              

#> Processing id: 8 	1/1  

#>                                                                              

# }