Showing 2 of 8 files from the diff.
Newly tracked file
src/triadCensus.cpp created.
Other files ignored by Codecov
DESCRIPTION has changed.
NAMESPACE has changed.
NEWS.md has changed.
R/RcppExports.R has changed.

@@ -0,0 +1,22 @@
Loading
1 +
// [[Rcpp::depends(RcppArmadillo)]]
2 +
#include <RcppArmadillo.h>
3 +
using namespace Rcpp;
4 +
5 +
// [[Rcpp::export]]
6 +
IntegerVector triadCensusSign(NumericMatrix A, int n){
7 +
8 +
  int code=0;
9 +
  IntegerVector triads(729);
10 +
11 +
  for(int u=0;u<n;++u){
12 +
    for(int v=0;v<n;++v){
13 +
      for(int w=0;w<n;++w){
14 +
        if((u<v) & (v<w)){
15 +
          code = A(u,v)+3*A(u,w)+9*A(v,u)+27*A(v,w)+81*A(w,u)+243*A(w,v);
16 +
          triads[code] = triads[code] + 1;
17 +
        }
18 +
      }
19 +
    }
20 +
  }
21 +
  return triads;
22 +
}

@@ -158,3 +158,426 @@
Loading
158 158
  tri_counts[match(names(tmp_counts),names(tri_counts))] <- tmp_counts
159 159
  tri_counts
160 160
}
161 +
162 +
#' @title signed triad census
163 +
#' @description triad census for signed graphs
164 +
#'
165 +
#' @param g igraph object with signed edge attribute
166 +
#' @return counts for all 139 signed directed triangle types
167 +
#' @author David Schoch
168 +
#' @examples
169 +
#' library(igraph)
170 +
#' g <- graph.full(4,directed = TRUE)
171 +
#' E(g)$sign <- c(-1,1,1,-1,-1,1)
172 +
#' triad_census_signed(g)
173 +
#' @export
174 +
175 +
triad_census_signed <- function(g){
176 +
  if(!igraph::is_directed(g)){
177 +
    stop("g must be a directed graph")
178 +
  }
179 +
  if(!"sign"%in%igraph::edge_attr_names(g)){
180 +
    stop("g does not have a sign edge attribute")
181 +
  }
182 +
  triad <- c(63, 62, 63, 61, 60, 61, 63, 62, 63, 59, 58, 59, 57, 56, 57,
183 +
             59, 58, 59, 63, 62, 63, 61, 60, 61, 63, 62, 63, 55, 54, 55, 53,
184 +
             52, 53, 55, 54, 55, 51, 50, 51, 49, 48, 49, 51, 50, 51, 55, 54,
185 +
             55, 53, 52, 53, 55, 54, 55, 63, 62, 63, 61, 60, 61, 63, 62, 63,
186 +
             59, 58, 59, 57, 56, 57, 59, 58, 59, 63, 62, 63, 61, 60, 61, 63,
187 +
             62, 63, 47, 46, 47, 45, 44, 45, 47, 46, 47, 43, 42, 43, 41, 40,
188 +
             41, 43, 42, 43, 47, 46, 47, 45, 44, 45, 47, 46, 47, 39, 38, 39,
189 +
             37, 36, 37, 39, 38, 39, 35, 34, 35, 33, 32, 33, 35, 34, 35, 39,
190 +
             38, 39, 37, 36, 37, 39, 38, 39, 47, 46, 47, 45, 44, 45, 47, 46,
191 +
             47, 43, 42, 43, 41, 40, 41, 43, 42, 43, 47, 46, 47, 45, 44, 45,
192 +
             47, 46, 47, 63, 62, 63, 61, 60, 61, 63, 62, 63, 59, 58, 59, 57,
193 +
             56, 57, 59, 58, 59, 63, 62, 63, 61, 60, 61, 63, 62, 63, 55, 54,
194 +
             55, 53, 52, 53, 55, 54, 55, 51, 50, 51, 49, 48, 49, 51, 50, 51,
195 +
             55, 54, 55, 53, 52, 53, 55, 54, 55, 63, 62, 63, 61, 60, 61, 63,
196 +
             62, 63, 59, 58, 59, 57, 56, 57, 59, 58, 59, 63, 62, 63, 61, 60,
197 +
             61, 63, 62, 63, 31, 30, 31, 29, 28, 29, 31, 30, 31, 27, 26, 27,
198 +
             25, 24, 25, 27, 26, 27, 31, 30, 31, 29, 28, 29, 31, 30, 31, 23,
199 +
             22, 23, 21, 20, 21, 23, 22, 23, 19, 18, 19, 17, 16, 17, 19, 18,
200 +
             19, 23, 22, 23, 21, 20, 21, 23, 22, 23, 31, 30, 31, 29, 28, 29,
201 +
             31, 30, 31, 27, 26, 27, 25, 24, 25, 27, 26, 27, 31, 30, 31, 29,
202 +
             28, 29, 31, 30, 31, 15, 14, 15, 13, 12, 13, 15, 14, 15, 11, 10,
203 +
             11, 9, 8, 9, 11, 10, 11, 15, 14, 15, 13, 12, 13, 15, 14, 15,
204 +
             7, 6, 7, 5, 4, 5, 7, 6, 7, 3, 2, 3, 1, 0, 1, 3, 2, 3, 7, 6, 7,
205 +
             5, 4, 5, 7, 6, 7, 15, 14, 15, 13, 12, 13, 15, 14, 15, 11, 10,
206 +
             11, 9, 8, 9, 11, 10, 11, 15, 14, 15, 13, 12, 13, 15, 14, 15,
207 +
             31, 30, 31, 29, 28, 29, 31, 30, 31, 27, 26, 27, 25, 24, 25, 27,
208 +
             26, 27, 31, 30, 31, 29, 28, 29, 31, 30, 31, 23, 22, 23, 21, 20,
209 +
             21, 23, 22, 23, 19, 18, 19, 17, 16, 17, 19, 18, 19, 23, 22, 23,
210 +
             21, 20, 21, 23, 22, 23, 31, 30, 31, 29, 28, 29, 31, 30, 31, 27,
211 +
             26, 27, 25, 24, 25, 27, 26, 27, 31, 30, 31, 29, 28, 29, 31, 30,
212 +
             31, 63, 62, 63, 61, 60, 61, 63, 62, 63, 59, 58, 59, 57, 56, 57,
213 +
             59, 58, 59, 63, 62, 63, 61, 60, 61, 63, 62, 63, 55, 54, 55, 53,
214 +
             52, 53, 55, 54, 55, 51, 50, 51, 49, 48, 49, 51, 50, 51, 55, 54,
215 +
             55, 53, 52, 53, 55, 54, 55, 63, 62, 63, 61, 60, 61, 63, 62, 63,
216 +
             59, 58, 59, 57, 56, 57, 59, 58, 59, 63, 62, 63, 61, 60, 61, 63,
217 +
             62, 63, 47, 46, 47, 45, 44, 45, 47, 46, 47, 43, 42, 43, 41, 40,
218 +
             41, 43, 42, 43, 47, 46, 47, 45, 44, 45, 47, 46, 47, 39, 38, 39,
219 +
             37, 36, 37, 39, 38, 39, 35, 34, 35, 33, 32, 33, 35, 34, 35, 39,
220 +
             38, 39, 37, 36, 37, 39, 38, 39, 47, 46, 47, 45, 44, 45, 47, 46,
221 +
             47, 43, 42, 43, 41, 40, 41, 43, 42, 43, 47, 46, 47, 45, 44, 45,
222 +
             47, 46, 47, 63, 62, 63, 61, 60, 61, 63, 62, 63, 59, 58, 59, 57,
223 +
             56, 57, 59, 58, 59, 63, 62, 63, 61, 60, 61, 63, 62, 63, 55, 54,
224 +
             55, 53, 52, 53, 55, 54, 55, 51, 50, 51, 49, 48, 49, 51, 50, 51,
225 +
             55, 54, 55, 53, 52, 53, 55, 54, 55, 63, 62, 63, 61, 60, 61, 63,
226 +
             62, 63, 59, 58, 59, 57, 56, 57, 59, 58, 59, 63, 62, 63, 61, 60,
227 +
             61, 63, 62, 63)
228 +
229 +
  tcode <- c("300", "210", "300", "210", "120U", "210", "300", "210", "300",
230 +
             "210", "201", "210", "120C", "111U", "120C", "210", "201", "210",
231 +
             "300", "210", "300", "210", "120U", "210", "300", "210", "300",
232 +
             "210", "120C", "210", "120D", "030T", "120D", "210", "120C",
233 +
             "210", "120U", "111U", "120U", "030T", "021D", "030T", "120U",
234 +
             "111U", "120U", "210", "120C", "210", "120D", "030T", "120D",
235 +
             "210", "120C", "210", "300", "210", "300", "210", "120U", "210",
236 +
             "300", "210", "300", "210", "201", "210", "120C", "111U", "120C",
237 +
             "210", "201", "210", "300", "210", "300", "210", "120U", "210",
238 +
             "300", "210", "300", "210", "120C", "210", "201", "111U", "201",
239 +
             "210", "120C", "210", "120D", "111D", "120D", "111D", "102",
240 +
             "111D", "120D", "111D", "120D", "210", "120C", "210", "201",
241 +
             "111U", "201", "210", "120C", "210", "120C", "030C", "120C",
242 +
             "111D", "021C", "111D", "120C", "030C", "120C", "030T", "021C",
243 +
             "030T", "021U", "012", "021U", "030T", "021C", "030T", "120C",
244 +
             "030C", "120C", "111D", "021C", "111D", "120C", "030C", "120C",
245 +
             "210", "120C", "210", "201", "111U", "201", "210", "120C", "210",
246 +
             "120D", "111D", "120D", "111D", "102", "111D", "120D", "111D",
247 +
             "120D", "210", "120C", "210", "201", "111U", "201", "210", "120C",
248 +
             "210", "300", "210", "300", "210", "120U", "210", "300", "210",
249 +
             "300", "210", "201", "210", "120C", "111U", "120C", "210", "201",
250 +
             "210", "300", "210", "300", "210", "120U", "210", "300", "210",
251 +
             "300", "210", "120C", "210", "120D", "030T", "120D", "210", "120C",
252 +
             "210", "120U", "111U", "120U", "030T", "021D", "030T", "120U",
253 +
             "111U", "120U", "210", "120C", "210", "120D", "030T", "120D",
254 +
             "210", "120C", "210", "300", "210", "300", "210", "120U", "210",
255 +
             "300", "210", "300", "210", "201", "210", "120C", "111U", "120C",
256 +
             "210", "201", "210", "300", "210", "300", "210", "120U", "210",
257 +
             "300", "210", "300", "210", "120D", "210", "120C", "030T", "120C",
258 +
             "210", "120D", "210", "120C", "111D", "120C", "030C", "021C",
259 +
             "030C", "120C", "111D", "120C", "210", "120D", "210", "120C",
260 +
             "030T", "120C", "210", "120D", "210", "201", "111D", "201", "111D",
261 +
             "021U", "111D", "201", "111D", "201", "111U", "102", "111U",
262 +
             "021C", "012", "021C", "111U", "102", "111U", "201", "111D",
263 +
             "201", "111D", "021U", "111D", "201", "111D", "201", "210", "120D",
264 +
             "210", "120C", "030T", "120C", "210", "120D", "210", "120C",
265 +
             "111D", "120C", "030C", "021C", "030C", "120C", "111D", "120C",
266 +
             "210", "120D", "210", "120C", "030T", "120C", "210", "120D",
267 +
             "210", "120U", "030T", "120U", "111U", "021D", "111U", "120U",
268 +
             "030T", "120U", "030T", "021U", "030T", "021C", "012", "021C",
269 +
             "030T", "021U", "030T", "120U", "030T", "120U", "111U", "021D",
270 +
             "111U", "120U", "030T", "120U", "111U", "021C", "111U", "102",
271 +
             "012", "102", "111U", "021C", "111U", "021D", "012", "021D",
272 +
             "012", "003", "012", "021D", "012", "021D", "111U", "021C", "111U",
273 +
             "102", "012", "102", "111U", "021C", "111U", "120U", "030T",
274 +
             "120U", "111U", "021D", "111U", "120U", "030T", "120U", "030T",
275 +
             "021U", "030T", "021C", "012", "021C", "030T", "021U", "030T",
276 +
             "120U", "030T", "120U", "111U", "021D", "111U", "120U", "030T",
277 +
             "120U", "210", "120D", "210", "120C", "030T", "120C", "210",
278 +
             "120D", "210", "120C", "111D", "120C", "030C", "021C", "030C",
279 +
             "120C", "111D", "120C", "210", "120D", "210", "120C", "030T",
280 +
             "120C", "210", "120D", "210", "201", "111D", "201", "111D", "021U",
281 +
             "111D", "201", "111D", "201", "111U", "102", "111U", "021C",
282 +
             "012", "021C", "111U", "102", "111U", "201", "111D", "201", "111D",
283 +
             "021U", "111D", "201", "111D", "201", "210", "120D", "210", "120C",
284 +
             "030T", "120C", "210", "120D", "210", "120C", "111D", "120C",
285 +
             "030C", "021C", "030C", "120C", "111D", "120C", "210", "120D",
286 +
             "210", "120C", "030T", "120C", "210", "120D", "210", "300", "210",
287 +
             "300", "210", "120U", "210", "300", "210", "300", "210", "201",
288 +
             "210", "120C", "111U", "120C", "210", "201", "210", "300", "210",
289 +
             "300", "210", "120U", "210", "300", "210", "300", "210", "120C",
290 +
             "210", "120D", "030T", "120D", "210", "120C", "210", "120U",
291 +
             "111U", "120U", "030T", "021D", "030T", "120U", "111U", "120U",
292 +
             "210", "120C", "210", "120D", "030T", "120D", "210", "120C",
293 +
             "210", "300", "210", "300", "210", "120U", "210", "300", "210",
294 +
             "300", "210", "201", "210", "120C", "111U", "120C", "210", "201",
295 +
             "210", "300", "210", "300", "210", "120U", "210", "300", "210",
296 +
             "300", "210", "120C", "210", "201", "111U", "201", "210", "120C",
297 +
             "210", "120D", "111D", "120D", "111D", "102", "111D", "120D",
298 +
             "111D", "120D", "210", "120C", "210", "201", "111U", "201", "210",
299 +
             "120C", "210", "120C", "030C", "120C", "111D", "021C", "111D",
300 +
             "120C", "030C", "120C", "030T", "021C", "030T", "021U", "012",
301 +
             "021U", "030T", "021C", "030T", "120C", "030C", "120C", "111D",
302 +
             "021C", "111D", "120C", "030C", "120C", "210", "120C", "210",
303 +
             "201", "111U", "201", "210", "120C", "210", "120D", "111D", "120D",
304 +
             "111D", "102", "111D", "120D", "111D", "120D", "210", "120C",
305 +
             "210", "201", "111U", "201", "210", "120C", "210", "300", "210",
306 +
             "300", "210", "120U", "210", "300", "210", "300", "210", "201",
307 +
             "210", "120C", "111U", "120C", "210", "201", "210", "300", "210",
308 +
             "300", "210", "120U", "210", "300", "210", "300", "210", "120C",
309 +
             "210", "120D", "030T", "120D", "210", "120C", "210", "120U",
310 +
             "111U", "120U", "030T", "021D", "030T", "120U", "111U", "120U",
311 +
             "210", "120C", "210", "120D", "030T", "120D", "210", "120C",
312 +
             "210", "300", "210", "300", "210", "120U", "210", "300", "210",
313 +
             "300", "210", "201", "210", "120C", "111U", "120C", "210", "201",
314 +
             "210", "300", "210", "300", "210", "120U", "210", "300", "210",
315 +
             "300")
316 +
317 +
  orbits <- c("35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
318 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "32-34-33", "19-19-20",
319 +
              "32-34-33", "29-31-30", "13-15-14", "29-31-30", "32-34-33", "19-19-20",
320 +
              "32-34-33", "35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
321 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "33-34-32", "31-29-30",
322 +
              "33-34-32", "28-28-27", "22-24-23", "28-28-27", "33-34-32", "31-29-30",
323 +
              "33-34-32", "26-25-26", "15-13-14", "26-25-26", "24-22-23", "12-12-11",
324 +
              "24-22-23", "26-25-26", "15-13-14", "26-25-26", "33-34-32", "31-29-30",
325 +
              "33-34-32", "28-28-27", "22-24-23", "28-28-27", "33-34-32", "31-29-30",
326 +
              "33-34-32", "35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
327 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "32-34-33", "19-19-20",
328 +
              "32-34-33", "29-31-30", "13-15-14", "29-31-30", "32-34-33", "19-19-20",
329 +
              "32-34-33", "35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
330 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "32-33-34", "29-30-31",
331 +
              "32-33-34", "19-20-19", "13-14-15", "19-20-19", "32-33-34", "29-30-31",
332 +
              "32-33-34", "27-28-28", "16-18-17", "27-28-28", "16-17-18", "4-5-5",
333 +
              "16-17-18", "27-28-28", "16-18-17", "27-28-28", "32-33-34", "29-30-31",
334 +
              "32-33-34", "19-20-19", "13-14-15", "19-20-19", "32-33-34", "29-30-31",
335 +
              "32-33-34", "30-31-29", "21-21-21", "30-31-29", "18-17-16", "8-6-7",
336 +
              "18-17-16", "30-31-29", "21-21-21", "30-31-29", "23-22-24", "7-8-6",
337 +
              "23-22-24", "10-9-10", "1-3-2", "10-9-10", "23-22-24", "7-8-6",
338 +
              "23-22-24", "30-31-29", "21-21-21", "30-31-29", "18-17-16", "8-6-7",
339 +
              "18-17-16", "30-31-29", "21-21-21", "30-31-29", "32-33-34", "29-30-31",
340 +
              "32-33-34", "19-20-19", "13-14-15", "19-20-19", "32-33-34", "29-30-31",
341 +
              "32-33-34", "27-28-28", "16-18-17", "27-28-28", "16-17-18", "4-5-5",
342 +
              "16-17-18", "27-28-28", "16-18-17", "27-28-28", "32-33-34", "29-30-31",
343 +
              "32-33-34", "19-20-19", "13-14-15", "19-20-19", "32-33-34", "29-30-31",
344 +
              "32-33-34", "35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
345 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "32-34-33", "19-19-20",
346 +
              "32-34-33", "29-31-30", "13-15-14", "29-31-30", "32-34-33", "19-19-20",
347 +
              "32-34-33", "35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
348 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "33-34-32", "31-29-30",
349 +
              "33-34-32", "28-28-27", "22-24-23", "28-28-27", "33-34-32", "31-29-30",
350 +
              "33-34-32", "26-25-26", "15-13-14", "26-25-26", "24-22-23", "12-12-11",
351 +
              "24-22-23", "26-25-26", "15-13-14", "26-25-26", "33-34-32", "31-29-30",
352 +
              "33-34-32", "28-28-27", "22-24-23", "28-28-27", "33-34-32", "31-29-30",
353 +
              "33-34-32", "35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
354 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "32-34-33", "19-19-20",
355 +
              "32-34-33", "29-31-30", "13-15-14", "29-31-30", "32-34-33", "19-19-20",
356 +
              "32-34-33", "35-35-35", "34-32-33", "35-35-35", "34-33-32", "25-26-26",
357 +
              "34-33-32", "35-35-35", "34-32-33", "35-35-35", "33-32-34", "28-27-28",
358 +
              "33-32-34", "31-30-29", "22-23-24", "31-30-29", "33-32-34", "28-27-28",
359 +
              "33-32-34", "30-29-31", "18-16-17", "30-29-31", "21-21-21", "8-7-6",
360 +
              "21-21-21", "30-29-31", "18-16-17", "30-29-31", "33-32-34", "28-27-28",
361 +
              "33-32-34", "31-30-29", "22-23-24", "31-30-29", "33-32-34", "28-27-28",
362 +
              "33-32-34", "20-19-19", "17-16-18", "20-19-19", "17-18-16", "9-10-10",
363 +
              "17-18-16", "20-19-19", "17-16-18", "20-19-19", "14-13-15", "5-4-5",
364 +
              "14-13-15", "6-8-7", "3-1-2", "6-8-7", "14-13-15", "5-4-5", "14-13-15",
365 +
              "20-19-19", "17-16-18", "20-19-19", "17-18-16", "9-10-10", "17-18-16",
366 +
              "20-19-19", "17-16-18", "20-19-19", "33-32-34", "28-27-28", "33-32-34",
367 +
              "31-30-29", "22-23-24", "31-30-29", "33-32-34", "28-27-28", "33-32-34",
368 +
              "30-29-31", "18-16-17", "30-29-31", "21-21-21", "8-7-6", "21-21-21",
369 +
              "30-29-31", "18-16-17", "30-29-31", "33-32-34", "28-27-28", "33-32-34",
370 +
              "31-30-29", "22-23-24", "31-30-29", "33-32-34", "28-27-28", "33-32-34",
371 +
              "26-26-25", "24-23-22", "26-26-25", "15-14-13", "12-11-12", "15-14-13",
372 +
              "26-26-25", "24-23-22", "26-26-25", "23-24-22", "10-10-9", "23-24-22",
373 +
              "7-6-8", "1-2-3", "7-6-8", "23-24-22", "10-10-9", "23-24-22",
374 +
              "26-26-25", "24-23-22", "26-26-25", "15-14-13", "12-11-12", "15-14-13",
375 +
              "26-26-25", "24-23-22", "26-26-25", "14-15-13", "6-7-8", "14-15-13",
376 +
              "5-5-4", "3-2-1", "5-5-4", "14-15-13", "6-7-8", "14-15-13", "11-12-12",
377 +
              "2-1-3", "11-12-12", "2-3-1", "0-0-0", "2-3-1", "11-12-12", "2-1-3",
378 +
              "11-12-12", "14-15-13", "6-7-8", "14-15-13", "5-5-4", "3-2-1",
379 +
              "5-5-4", "14-15-13", "6-7-8", "14-15-13", "26-26-25", "24-23-22",
380 +
              "26-26-25", "15-14-13", "12-11-12", "15-14-13", "26-26-25", "24-23-22",
381 +
              "26-26-25", "23-24-22", "10-10-9", "23-24-22", "7-6-8", "1-2-3",
382 +
              "7-6-8", "23-24-22", "10-10-9", "23-24-22", "26-26-25", "24-23-22",
383 +
              "26-26-25", "15-14-13", "12-11-12", "15-14-13", "26-26-25", "24-23-22",
384 +
              "26-26-25", "33-32-34", "28-27-28", "33-32-34", "31-30-29", "22-23-24",
385 +
              "31-30-29", "33-32-34", "28-27-28", "33-32-34", "30-29-31", "18-16-17",
386 +
              "30-29-31", "21-21-21", "8-7-6", "21-21-21", "30-29-31", "18-16-17",
387 +
              "30-29-31", "33-32-34", "28-27-28", "33-32-34", "31-30-29", "22-23-24",
388 +
              "31-30-29", "33-32-34", "28-27-28", "33-32-34", "20-19-19", "17-16-18",
389 +
              "20-19-19", "17-18-16", "9-10-10", "17-18-16", "20-19-19", "17-16-18",
390 +
              "20-19-19", "14-13-15", "5-4-5", "14-13-15", "6-8-7", "3-1-2",
391 +
              "6-8-7", "14-13-15", "5-4-5", "14-13-15", "20-19-19", "17-16-18",
392 +
              "20-19-19", "17-18-16", "9-10-10", "17-18-16", "20-19-19", "17-16-18",
393 +
              "20-19-19", "33-32-34", "28-27-28", "33-32-34", "31-30-29", "22-23-24",
394 +
              "31-30-29", "33-32-34", "28-27-28", "33-32-34", "30-29-31", "18-16-17",
395 +
              "30-29-31", "21-21-21", "8-7-6", "21-21-21", "30-29-31", "18-16-17",
396 +
              "30-29-31", "33-32-34", "28-27-28", "33-32-34", "31-30-29", "22-23-24",
397 +
              "31-30-29", "33-32-34", "28-27-28", "33-32-34", "35-35-35", "34-32-33",
398 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
399 +
              "35-35-35", "32-34-33", "19-19-20", "32-34-33", "29-31-30", "13-15-14",
400 +
              "29-31-30", "32-34-33", "19-19-20", "32-34-33", "35-35-35", "34-32-33",
401 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
402 +
              "35-35-35", "33-34-32", "31-29-30", "33-34-32", "28-28-27", "22-24-23",
403 +
              "28-28-27", "33-34-32", "31-29-30", "33-34-32", "26-25-26", "15-13-14",
404 +
              "26-25-26", "24-22-23", "12-12-11", "24-22-23", "26-25-26", "15-13-14",
405 +
              "26-25-26", "33-34-32", "31-29-30", "33-34-32", "28-28-27", "22-24-23",
406 +
              "28-28-27", "33-34-32", "31-29-30", "33-34-32", "35-35-35", "34-32-33",
407 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
408 +
              "35-35-35", "32-34-33", "19-19-20", "32-34-33", "29-31-30", "13-15-14",
409 +
              "29-31-30", "32-34-33", "19-19-20", "32-34-33", "35-35-35", "34-32-33",
410 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
411 +
              "35-35-35", "32-33-34", "29-30-31", "32-33-34", "19-20-19", "13-14-15",
412 +
              "19-20-19", "32-33-34", "29-30-31", "32-33-34", "27-28-28", "16-18-17",
413 +
              "27-28-28", "16-17-18", "4-5-5", "16-17-18", "27-28-28", "16-18-17",
414 +
              "27-28-28", "32-33-34", "29-30-31", "32-33-34", "19-20-19", "13-14-15",
415 +
              "19-20-19", "32-33-34", "29-30-31", "32-33-34", "30-31-29", "21-21-21",
416 +
              "30-31-29", "18-17-16", "8-6-7", "18-17-16", "30-31-29", "21-21-21",
417 +
              "30-31-29", "23-22-24", "7-8-6", "23-22-24", "10-9-10", "1-3-2",
418 +
              "10-9-10", "23-22-24", "7-8-6", "23-22-24", "30-31-29", "21-21-21",
419 +
              "30-31-29", "18-17-16", "8-6-7", "18-17-16", "30-31-29", "21-21-21",
420 +
              "30-31-29", "32-33-34", "29-30-31", "32-33-34", "19-20-19", "13-14-15",
421 +
              "19-20-19", "32-33-34", "29-30-31", "32-33-34", "27-28-28", "16-18-17",
422 +
              "27-28-28", "16-17-18", "4-5-5", "16-17-18", "27-28-28", "16-18-17",
423 +
              "27-28-28", "32-33-34", "29-30-31", "32-33-34", "19-20-19", "13-14-15",
424 +
              "19-20-19", "32-33-34", "29-30-31", "32-33-34", "35-35-35", "34-32-33",
425 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
426 +
              "35-35-35", "32-34-33", "19-19-20", "32-34-33", "29-31-30", "13-15-14",
427 +
              "29-31-30", "32-34-33", "19-19-20", "32-34-33", "35-35-35", "34-32-33",
428 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
429 +
              "35-35-35", "33-34-32", "31-29-30", "33-34-32", "28-28-27", "22-24-23",
430 +
              "28-28-27", "33-34-32", "31-29-30", "33-34-32", "26-25-26", "15-13-14",
431 +
              "26-25-26", "24-22-23", "12-12-11", "24-22-23", "26-25-26", "15-13-14",
432 +
              "26-25-26", "33-34-32", "31-29-30", "33-34-32", "28-28-27", "22-24-23",
433 +
              "28-28-27", "33-34-32", "31-29-30", "33-34-32", "35-35-35", "34-32-33",
434 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
435 +
              "35-35-35", "32-34-33", "19-19-20", "32-34-33", "29-31-30", "13-15-14",
436 +
              "29-31-30", "32-34-33", "19-19-20", "32-34-33", "35-35-35", "34-32-33",
437 +
              "35-35-35", "34-33-32", "25-26-26", "34-33-32", "35-35-35", "34-32-33",
438 +
              "35-35-35")
439 +
440 +
  signsign <- c("NNNNNN", "NNN0NN", "NNNNNP", "NNN0NN", "0N0NNN", "NNN0NP",
441 +
                "NNNNNP", "NNN0NP", "NNNPNP", "NNN0NN", "00NNNN", "NNP0NN", "0NN0NN",
442 +
                "0N00NN", "0NP0NN", "PNN0NN", "00NNPN", "PNP0NN", "NNNNNP", "NNP0NN",
443 +
                "NNNNPP", "NNN0PN", "0N0PNN", "NNN0PP", "NNNPPN", "NNP0NP", "NNNPPP",
444 +
                "NNN0NN", "0NN0NN", "NNN0PN", "N0N0NN", "0N0NN0", "N0N0NP", "NPN0NN",
445 +
                "0NN0NP", "NPN0PN", "0N0NNN", "0N00NN", "0N0PNN", "0N0NN0", "N0N000",
446 +
                "0N0PN0", "0N0NNP", "0N00NP", "0N0PNP", "NNN0NP", "0NP0NN", "NNN0PP",
447 +
                "N0N0NP", "0N0PN0", "N0N0PP", "NPN0NP", "0NP0NP", "NPN0PP", "NNNNNP",
448 +
                "PNN0NN", "NNNPPN", "NPN0NN", "0N0NNP", "NPN0NP", "NPNPNN", "PNN0NP",
449 +
                "NPNPNP", "NNN0NP", "00NNPN", "NNP0NP", "0NN0NP", "0N00NP", "0NP0NP",
450 +
                "PNN0NP", "00PNPN", "PNP0NP", "NNNPNP", "PNP0NN", "NNNPPP", "NPN0PN",
451 +
                "0N0PNP", "NPN0PP", "NPNPNP", "PNP0NP", "NPNPPP", "NNN0NN", "0NN0NN",
452 +
                "PNN0NN", "00NNNN", "0N00NN", "00NNPN", "NNP0NN", "0NP0NN", "PNP0NN",
453 +
                "N0N0NN", "N000NN", "N0P0NN", "N000NN", "0000NN", "P000NN", "N0P0NN",
454 +
                "P000NN", "P0P0NN", "NPN0NN", "0PN0NN", "PPN0NN", "00NNNP", "0P00NN",
455 +
                "00NNPP", "NPP0NN", "0PP0NN", "PPP0NN", "0NN0NN", "N00NN0", "0NN0PN",
456 +
                "N000NN", "0NN000", "N000NP", "0PN0NN", "N00PN0", "0PN0PN", "0N0NN0",
457 +
                "0NN000", "0P0NN0", "0N0N00", "0000N0", "0N0P00", "0N0NP0", "0PN000",
458 +
                "0P0NP0", "0NN0NP", "N00PN0", "0NN0PP", "N000PN", "0NP000", "N000PP",
459 +
                "0PN0NP", "N00PP0", "0PN0PP", "NNN0PN", "0NN0PN", "PNN0PN", "00NNNP",
460 +
                "0N00PN", "00NPPN", "NNP0PN", "0NP0PN", "PNP0PN", "N0N0NP", "N000NP",
461 +
                "N0P0NP", "N000PN", "0000NP", "P000PN", "P0N0NP", "P000NP", "P0P0NP",
462 +
                "NPN0PN", "0PN0PN", "PPN0PN", "00NPNP", "0P00PN", "00NPPP", "NPP0PN",
463 +
                "0PP0PN", "PPP0PN", "NNNNNP", "NNN0PN", "NNNPPN", "NNP0NN", "0N0PNN",
464 +
                "NNP0NP", "NNNNPP", "NNN0PP", "NNNPPP", "NPN0NN", "00NNNP", "NPP0NN",
465 +
                "0PN0NN", "0P00NN", "0PP0NN", "PPN0NN", "00NNPP", "PPP0NN", "NPNPNN",
466 +
                "NNP0PN", "NNPNPP", "NNP0PN", "0P0PNN", "NNP0PP", "NNPNPP", "NNP0PP",
467 +
                "NNPPPP", "PNN0NN", "0NN0PN", "PNN0PN", "N0P0NN", "0P0NN0", "N0P0NP",
468 +
                "PPN0NN", "0NN0PP", "PPN0PN", "0N0NNP", "0N00PN", "0N0PPN", "0N0NP0",
469 +
                "N0P000", "0N0PP0", "0N0NPP", "0N00PP", "0N0PPP", "PNN0NP", "0NP0PN",
470 +
                "PNN0PP", "P0N0NP", "0P0PN0", "N0P0PP", "PPN0NP", "0NP0PP", "PPN0PP",
471 +
                "NNNPPN", "PNN0PN", "PNNPPN", "NPP0NN", "0N0PPN", "NPP0NP", "NNPNPP",
472 +
                "PNN0PP", "PNNPPP", "NPN0NP", "00NPPN", "NPP0NP", "0PN0NP", "0P00NP",
473 +
                "0PP0NP", "PPN0NP", "00PNPP", "PPP0NP", "NPNPNP", "PNP0PN", "PNNPPP",
474 +
                "NPP0PN", "0P0PNP", "NPP0PP", "PPNPNP", "PNP0PP", "NPPPPP", "NNN0NN",
475 +
                "N0N0NN", "NPN0NN", "0NN0NN", "0N0NN0", "0NN0NP", "NNN0PN", "N0N0NP",
476 +
                "NPN0PN", "0NN0NN", "N000NN", "0PN0NN", "N00NN0", "0NN000", "N00PN0",
477 +
                "0NN0PN", "N000NP", "0PN0PN", "PNN0NN", "N0P0NN", "PPN0NN", "0NN0PN",
478 +
                "0P0NN0", "0NN0PP", "PNN0PN", "N0P0NP", "PPN0PN", "00NNNN", "N000NN",
479 +
                "00NNNP", "N000NN", "0N0N00", "N000PN", "00NNNP", "N000PN", "00NPNP",
480 +
                "0N00NN", "0000NN", "0P00NN", "0NN000", "0000N0", "0NP000", "0N00PN",
481 +
                "0000NP", "0P00PN", "00NNPN", "P000NN", "00NNPP", "N000NP", "0N0P00",
482 +
                "N000PP", "00NPPN", "P000PN", "00NPPP", "NNP0NN", "N0P0NN", "NPP0NN",
483 +
                "0PN0NN", "0N0NP0", "0PN0NP", "NNP0PN", "P0N0NP", "NPP0PN", "0NP0NN",
484 +
                "P000NN", "0PP0NN", "N00PN0", "0PN000", "N00PP0", "0NP0PN", "P000NP",
485 +
                "0PP0PN", "PNP0NN", "P0P0NN", "PPP0NN", "0PN0PN", "0P0NP0", "0PN0PP",
486 +
                "PNP0PN", "P0P0NP", "PPP0PN", "0N0NNN", "0N0NN0", "0N0NNP", "0N00NN",
487 +
                "N0N000", "0N00NP", "0N0PNN", "0N0PN0", "0N0PNP", "0N0NN0", "0N0N00",
488 +
                "0N0NP0", "0NN000", "0000N0", "0PN000", "0P0NN0", "0N0P00", "0P0NP0",
489 +
                "0N0NNP", "0N0NP0", "0N0NPP", "0N00PN", "N0P000", "0N00PP", "0N0PPN",
490 +
                "0N0PP0", "0N0PPP", "0N00NN", "0NN000", "0N00PN", "0000NN", "0000N0",
491 +
                "0000NP", "0P00NN", "0NP000", "0P00PN", "N0N000", "0000N0", "N0P000",
492 +
                "0000N0", "000000", "0000P0", "N0P000", "0000P0", "P0P000", "0N00NP",
493 +
                "0PN000", "0N00PP", "0000NP", "0000P0", "0000PP", "0P00NP", "0PP000",
494 +
                "0P00PP", "0N0PNN", "0P0NN0", "0N0PPN", "0P00NN", "N0P000", "0P00NP",
495 +
                "0P0PNN", "0P0PN0", "0P0PNP", "0N0PN0", "0N0P00", "0N0PP0", "0NP000",
496 +
                "0000P0", "0PP000", "0P0PN0", "0P0P00", "0P0PP0", "0N0PNP", "0P0NP0",
497 +
                "0N0PPP", "0P00PN", "P0P000", "0P00PP", "0P0PNP", "0P0PP0", "0P0PPP",
498 +
                "NNN0NP", "N0N0NP", "NPN0NP", "0NP0NN", "0N0PN0", "0NP0NP", "NNN0PP",
499 +
                "N0N0PP", "NPN0PP", "0NN0NP", "N000PN", "0PN0NP", "N00PN0", "0NP000",
500 +
                "N00PP0", "0NN0PP", "N000PP", "0PN0PP", "PNN0NP", "P0N0NP", "PPN0NP",
501 +
                "0NP0PN", "0P0PN0", "0NP0PP", "PNN0PP", "N0P0PP", "PPN0PP", "00NNPN",
502 +
                "N000NP", "00NPPN", "P000NN", "0N0P00", "P000PN", "00NNPP", "N000PP",
503 +
                "00NPPP", "0N00NP", "0000NP", "0P00NP", "0PN000", "0000P0", "0PP000",
504 +
                "0N00PP", "0000PP", "0P00PP", "00PNPN", "P000NP", "00PNPP", "P000NP",
505 +
                "0P0P00", "P000PP", "00PNPP", "P000PP", "00PPPP", "NNP0NP", "N0P0NP",
506 +
                "NPP0NP", "0PP0NN", "0N0PP0", "0PP0NP", "NNP0PP", "N0P0PP", "NPP0PP",
507 +
                "0NP0NP", "P000PN", "0PP0NP", "N00PP0", "0PP000", "P00PP0", "0NP0PP",
508 +
                "P000PP", "0PP0PP", "PNP0NP", "P0P0NP", "PPP0NP", "0PP0PN", "0P0PP0",
509 +
                "0PP0PP", "PNP0PP", "P0P0PP", "PPP0PP", "NNNNNP", "NPN0NN", "NPNPNN",
510 +
                "PNN0NN", "0N0NNP", "PNN0NP", "NNNPPN", "NPN0NP", "NPNPNP", "NNN0PN",
511 +
                "00NNNP", "NNP0PN", "0NN0PN", "0N00PN", "0NP0PN", "PNN0PN", "00NPPN",
512 +
                "PNP0PN", "NNNPPN", "NPP0NN", "NNPNPP", "PNN0PN", "0N0PPN", "PNN0PP",
513 +
                "PNNPPN", "NPP0NP", "PNNPPP", "NNP0NN", "0PN0NN", "NNP0PN", "N0P0NN",
514 +
                "0N0NP0", "P0N0NP", "NPP0NN", "0PN0NP", "NPP0PN", "0N0PNN", "0P00NN",
515 +
                "0P0PNN", "0P0NN0", "N0P000", "0P0PN0", "0N0PPN", "0P00NP", "0P0PNP",
516 +
                "NNP0NP", "0PP0NN", "NNP0PP", "N0P0NP", "0N0PP0", "N0P0PP", "NPP0NP",
517 +
                "0PP0NP", "NPP0PP", "NNNNPP", "PPN0NN", "NNPNPP", "PPN0NN", "0N0NPP",
518 +
                "PPN0NP", "NNPNPP", "PPN0NP", "PPNPNP", "NNN0PP", "00NNPP", "NNP0PP",
519 +
                "0NN0PP", "0N00PP", "0NP0PP", "PNN0PP", "00PNPP", "PNP0PP", "NNNPPP",
520 +
                "PPP0NN", "NNPPPP", "PPN0PN", "0N0PPP", "PPN0PP", "PNNPPP", "PPP0NP",
521 +
                "NPPPPP", "NNN0NP", "0NN0NP", "PNN0NP", "00NNPN", "0N00NP", "00PNPN",
522 +
                "NNP0NP", "0NP0NP", "PNP0NP", "N0N0NP", "N000PN", "P0N0NP", "N000NP",
523 +
                "0000NP", "P000NP", "N0P0NP", "P000PN", "P0P0NP", "NPN0NP", "0PN0NP",
524 +
                "PPN0NP", "00NPPN", "0P00NP", "00PNPP", "NPP0NP", "0PP0NP", "PPP0NP",
525 +
                "0NP0NN", "N00PN0", "0NP0PN", "P000NN", "0PN000", "P000NP", "0PP0NN",
526 +
                "N00PP0", "0PP0PN", "0N0PN0", "0NP000", "0P0PN0", "0N0P00", "0000P0",
527 +
                "0P0P00", "0N0PP0", "0PP000", "0P0PP0", "0NP0NP", "N00PP0", "0NP0PP",
528 +
                "P000PN", "0PP000", "P000PP", "0PP0NP", "P00PP0", "0PP0PP", "NNN0PP",
529 +
                "0NN0PP", "PNN0PP", "00NNPP", "0N00PP", "00PNPP", "NNP0PP", "0NP0PP",
530 +
                "PNP0PP", "N0N0PP", "N000PP", "N0P0PP", "N000PP", "0000PP", "P000PP",
531 +
                "N0P0PP", "P000PP", "P0P0PP", "NPN0PP", "0PN0PP", "PPN0PP", "00NPPP",
532 +
                "0P00PP", "00PPPP", "NPP0PP", "0PP0PP", "PPP0PP", "NNNPNP", "NPN0PN",
533 +
                "NPNPNP", "PNP0NN", "0N0PNP", "PNP0NP", "NNNPPP", "NPN0PP", "NPNPPP",
534 +
                "NPN0PN", "00NPNP", "NPP0PN", "0PN0PN", "0P00PN", "0PP0PN", "PPN0PN",
535 +
                "00NPPP", "PPP0PN", "NPNPNP", "NPP0PN", "PPNPNP", "PNP0PN", "0P0PNP",
536 +
                "PNP0PP", "PNNPPP", "NPP0PP", "NPPPPP", "PNP0NN", "0PN0PN", "PNP0PN",
537 +
                "P0P0NN", "0P0NP0", "P0P0NP", "PPP0NN", "0PN0PP", "PPP0PN", "0N0PNP",
538 +
                "0P00PN", "0P0PNP", "0P0NP0", "P0P000", "0P0PP0", "0N0PPP", "0P00PP",
539 +
                "0P0PPP", "PNP0NP", "0PP0PN", "PNP0PP", "P0P0NP", "0P0PP0", "P0P0PP",
540 +
                "PPP0NP", "0PP0PP", "PPP0PP", "NNNPPP", "PPN0PN", "PNNPPP", "PPP0NN",
541 +
                "0N0PPP", "PPP0NP", "NNPPPP", "PPN0PP", "NPPPPP", "NPN0PP", "00NPPP",
542 +
                "NPP0PP", "0PN0PP", "0P00PP", "0PP0PP", "PPN0PP", "00PPPP", "PPP0PP",
543 +
                "NPNPPP", "PPP0PN", "NPPPPP", "PPP0PN", "0P0PPP", "PPP0PP", "NPPPPP",
544 +
                "PPP0PP", "PPPPPP")
545 +
546 +
  A <- as_adj_signed(g,sparse = FALSE) + 1
547 +
  n <- nrow(A)
548 +
  triads <- triadCensusSign(A,n)
549 +
  names(triads) <- paste0(tcode,"-",signsign)
550 +
  df <- stats::aggregate(formula = count~type,data = data.frame(type=names(triads),count=triads),FUN = sum)
551 +
  census <- df[["count"]]
552 +
  names(census) <- df[["type"]]
553 +
  triple_order <- c(
554 +
    "003-000000", "012-0000P0", "012-0000N0", "102-0000PP", "102-0000NP",
555 +
    "102-0000NN", "021C-0PP000", "021C-0NP000", "021C-0PN000", "021C-0NN000",
556 +
    "021U-0P0P00", "021U-0N0P00", "021U-0N0N00", "021D-P0P000", "021D-N0P000",
557 +
    "021D-N0N000", "111U-0P00PP", "111U-0N00PP", "111U-0P00NP", "111U-0P00PN",
558 +
    "111U-0N00NP", "111U-0N00PN", "111U-0P00NN", "111U-0N00NN", "111D-P000PP",
559 +
    "111D-N000PP", "111D-P000NP", "111D-P000PN", "111D-N000NP", "111D-N000PN",
560 +
    "111D-P000NN", "111D-N000NN", "201-00PPPP", "201-00NPPP", "201-00PNPP",
561 +
    "201-00NNPP", "201-00NPNP", "201-00NPPN", "201-00PNPN", "201-00NNNP",
562 +
    "201-00NNPN", "201-00NNNN", "030C-P00PP0", "030C-N00PP0", "030C-N00PN0",
563 +
    "030C-N00NN0", "030T-0P0PP0", "030T-0N0PP0", "030T-0P0NP0", "030T-0P0PN0",
564 +
    "030T-0N0NP0", "030T-0N0PN0", "030T-0P0NN0", "030T-0N0NN0", "120U-0P0PPP",
565 +
    "120U-0N0PPP", "120U-0P0PNP", "120U-0N0NPP", "120U-0N0PNP", "120U-0N0PPN",
566 +
    "120U-0P0PNN", "120U-0N0NNP", "120U-0N0PNN", "120U-0N0NNN", "120D-P0P0PP",
567 +
    "120D-N0P0PP", "120D-P0P0NP", "120D-N0N0PP", "120D-N0P0NP", "120D-P0N0NP",
568 +
    "120D-P0P0NN", "120D-N0N0NP", "120D-N0P0NN", "120D-N0N0NN", "120C-0PP0PP",
569 +
    "120C-0NP0PP", "120C-0PN0PP", "120C-0PP0NP", "120C-0PP0PN", "120C-0NN0PP",
570 +
    "120C-0NP0NP", "120C-0NP0PN", "120C-0PN0NP", "120C-0PN0PN", "120C-0PP0NN",
571 +
    "120C-0NN0NP", "120C-0NN0PN", "120C-0NP0NN", "120C-0PN0NN", "120C-0NN0NN",
572 +
    "210-PPP0PP", "210-NPP0PP", "210-PNP0PP", "210-PPN0PP", "210-PPP0NP",
573 +
    "210-PPP0PN", "210-NNP0PP", "210-NPN0PP", "210-NPP0NP", "210-NPP0PN",
574 +
    "210-PNN0PP", "210-PNP0NP", "210-PNP0PN", "210-PPN0NP", "210-PPN0PN",
575 +
    "210-PPP0NN", "210-NNN0PP", "210-NNP0NP", "210-NNP0PN", "210-NPN0NP",
576 +
    "210-NPN0PN", "210-NPP0NN", "210-PNN0NP", "210-PNN0PN", "210-PNP0NN",
577 +
    "210-PPN0NN", "210-NNN0NP", "210-NNN0PN", "210-NNP0NN", "210-NPN0NN",
578 +
    "210-PNN0NN", "210-NNN0NN", "300-PPPPPP", "300-NPPPPP", "300-NNPPPP",
579 +
    "300-NPNPPP", "300-PNNPPP", "300-PPNPNP", "300-NNNPPP", "300-NNPNPP",
580 +
    "300-NPNPNP", "300-PNNPPN", "300-NNNNPP", "300-NNNPNP",
581 +
    "300-NNNPPN", "300-NPNPNN", "300-NNNNNP", "300-NNNNNN")
582 +
  census[match(names(census),triple_order)]
583 +
}
Files Coverage
R 45.28%
src 93.33%
Project Totals (13 files) 53.45%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
    patch:
10
      default:
11
        target: auto
12
        threshold: 1%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading