tests/testthat/test-sample_pa_homophilic.R

test_that("sample_pa_homophilic works", {
    g <- sample_pa_homophilic(
        n = 50,
        m = 2,
        minority_fraction = 0.2,
        h_ab = 1
    )
    expect_true(sum(V(g)$minority) == 10)
})

Try the netUtils package in your browser

Any scripts or data that you put into this service are public.

netUtils documentation built on Oct. 11, 2024, 1:08 a.m.