tests/test_gather_stats_1.R

library("FoFaF")
rm(list = ls())

graph <- read.table("tests/test.txt")

input_object <- list(graph =  as.matrix(graph))
stats <- gather_stats(input_object,G_k = 10, G_b = 10)

# check
initial_graph <- as.matrix(graph[graph[,3] == graph[1,3],1:2])
u             <- as_adjacency_matrix(graph.edgelist(matrix(as.character(initial_graph[,1:2]), ncol = 2), 
                                        directed=FALSE), sparse = FALSE)
u_square      <- u %*%u
deg_vector    <- rowSums(u) 
thongphamthe/mcPAFit documentation built on May 20, 2019, 10:23 p.m.