Computes features for each network.
compute_features.Rd
This function computes features for each network using graph theoretic constructs.
Arguments
- gr
The network or graph as an
igraph
object.- attributes
If the network nodes/vertices have attributes, then
attributes = TRUE
.- attr_name
The name of the node/vertex attribute. Only a single attribute can be specified.
- fast
If set to
TRUE
will avoid computing time consuming features.
Examples
set.seed(1)
gr <- igraph::erdos.renyi.game(100, 0.05)
compute_features(gr)
#> $num_nodes
#> [1] 100
#>
#> $triangles_99
#> 99%
#> 4
#>
#> $degree_99
#> 99%
#> 10
#>
#> $edges
#> [1] 243
#>
#> $density
#> [1] 0.04909091
#>
#> $clustering_coef
#> [1] 0.04991243
#>
#> $assortativity
#> [1] 0.01358161
#>
#> $mean_distance
#> [1] 3.015359
#>
#> $diameter
#> [1] 6
#>
#> $isolates
#> [1] 0.02
#>
#> $connectivity
#> [1] 0
#>
#> $efficiency
#> [1] 0.361064
#>
#> $num_clusters
#> [1] 3
#>
#> $cluster_size_99
#> 99%
#> 96.06
#>
#> $close_overpoint8
#> [1] 0
#>
#> $betweenness_99
#> 99%
#> 272.1782
#>
#> $pagerank_99
#> 99%
#> 0.0181668
#>
#> $cores_99
#> 99%
#> 4
#>
#> $hubs_value
#> [1] 34.00637
#>
#> $authority_value
#> [1] 34.00637
#>
#> $call
#> compute_features(gr = gr)
#>
#> attr(,"class")
#> [1] "networkfeatures"