Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ vignettes/precompile\.R
^CRAN-SUBMISSION$
^README\.Rmd$
^.mailmap$
^\.positai$
^\.claude$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ inst/tutorials/community/community_data/*
inst/tutorials/equivalence/equivalence_data/*
inst/tutorials/tutorial4/community_data/*
inst/tutorials/tutorial5/equivalence_data/*
.positai
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Package: migraph
Title: Inferential Methods for Multimodal and Other Networks
Version: 1.6.2
Date: 2026-04-17
Version: 1.6.3
Comment thread
jhollway marked this conversation as resolved.
Description: A set of tools for testing networks.
It includes functions for univariate and multivariate
conditional uniform graph and quadratic assignment procedure testing,
Expand All @@ -18,10 +17,9 @@ License: MIT + file LICENSE
Language: en-GB
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.3
Depends:
R (>= 3.6.0),
manynet (>= 1.0.5),
R (>= 4.1.0),
manynet (>= 2.0.0),
autograph (>= 0.4.0),
netrics
Imports:
Expand Down Expand Up @@ -64,3 +62,4 @@ Roxygen: list(markdown = TRUE, roclets = c("namespace", "rd"))
Config/testthat/parallel: true
Config/testthat/edition: 3
Config/testthat/start-first: tutorials_manynet
Config/roxygen2/version: 8.0.0
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ S3method(tidy,ergm)
S3method(tidy,netlm)
S3method(tidy,netlogit)
S3method(tidy,sienaFit)
export("%>%")
export(extract_tute)
export(glance)
export(net_regression)
Expand All @@ -36,7 +35,6 @@ export(test_random)
export(tidy)
importFrom(autograph,ag_base)
importFrom(dplyr,"%>%")
importFrom(dplyr,`%>%`)
importFrom(dplyr,as_tibble)
importFrom(dplyr,bind_cols)
importFrom(dplyr,left_join)
Expand Down
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# migraph 1.6.3

2026-06-19

## Package

- Removed `%>%` reexport plumbing and refreshed generated reexport docs accordingly

## Testing

- Updated diffusion goodness-of-fit logic (`test_fit()`) and its tests to use the newer diffusion representation (notably `t`)

# migraph 1.6.2

2026-04-17
Expand Down
2 changes: 1 addition & 1 deletion R/migraph-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ thisRequires <- function(pkgname){
}

# defining global variables more centrally
utils::globalVariables(c(".data", "obs", "fin","n","sim","time","value","conf.low","conf.high",
utils::globalVariables(c(".data", "obs", "fin","n","S","I","t","sim","time","value","conf.low","conf.high",
"name"))

# Suppress R CMD check note
Expand Down
11 changes: 6 additions & 5 deletions R/model_distrib.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ test_fit <- function(diff_model, diff_models){ # make into method?
x <- diff_model
if(manynet::is_graph(x)) x <- manynet::as_diffusion(x)
y <- diff_models
sim <- `0` <- NULL
sims <- y %>% dplyr::select(sim, time, I)
if(max(x$time) < max(sims$time)){
sims <- y %>% dplyr::select(sim, t, I)
if(max(x$t) < max(sims$t)){
x <- dplyr::mutate(x, t = as.integer(t), S = as.integer(S), I = as.integer(I)) |>
dplyr::select(t, S, I)
x <- dplyr::bind_rows(x,
dplyr::tibble(time = (max(x$time)+1):max(sims$time),
dplyr::tibble(t = (max(x$t)+1):max(sims$t),
S = x$S[nrow(x)], I = x$I[nrow(x)]))
}
sims <- as.data.frame.matrix(stats::xtabs(I ~ sim + time, sims)) # tidyr::pivot_wider replacement
sims <- as.data.frame.matrix(stats::xtabs(I ~ sim + t, sims)) # tidyr::pivot_wider replacement
sims <- sims[,colSums(stats::cov(sims))!=0]
mah <- stats::mahalanobis(x$I[-1], colMeans(sims), stats::cov(sims))
pval <- pchisq(mah, df=length(x$I[-1]), lower.tail=FALSE)
Expand Down
5 changes: 0 additions & 5 deletions R/reexports_classes.R

This file was deleted.

2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

0 errors | 0 warnings | 0 notes

- Updates to improve testing length
- Fixes reverse dependency issues for 'manynet' (and 'netrics')
Binary file modified inst/migraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions man/migraph-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/regression.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/test_distributions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tests.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-model_distrib.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test_that("test_distribution works", {
})

test_that("test_fit works", {
x <- play_diffusion(generate_random(15), transmissibility = 0.7)
x <- as_diffusion(play_diffusion(generate_random(15), transmissibility = 0.7))
y <- play_diffusions(generate_random(15), transmissibility = 0.1, times = 40)
res <- test_fit(x, y)
expect_output(print(res), "statistic")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-tutorials_autograph.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ test_that("autograph tutorial code runs without warnings or errors", {
info = paste("Error in tutorial", basename(tute)))
}
})

Loading