Closed loreabad6 closed 1 year ago
Hi! I briefly checked the problem and I think the error was created from the following commit: https://github.com/wch/r-source/commit/e56fd312afd51775a162e22a29249164bc74810c
In fact, now on R-devel we get the following:
library(sfnetworks)
sfn <- as_sfnetwork(roxel)
mtfrm(sfn)
#> Error in mtfrm.default(sfn): cannot mtfrm
Created on 2022-10-16 with reprex v2.0.2
The problem is that mtfrm()
is (somehow) internally called by match()
(as you said). I don't understand the reasoning behind that commit but, IMO, if the object of our test is to check that the two networks are equal, maybe we could run the following:
expect_true(igraph::identical_graphs(st_network_join(net, rdm_net), st_network_join(net, rdm))))
We could also define a new function (i.e. identical_sfnetwork()
) as a wrapper around identical_graphs
(with extra checks for CRS).
Base: 67.99% // Head: 67.99% // No change to project coverage :thumbsup:
Coverage data is based on head (
d6257a5
) compared to base (9ac2842
). Patch has no changes to coverable lines.:exclamation: Current head d6257a5 differs from pull request most recent head e2bce40. Consider uploading reports for the commit e2bce40 to get more accurate results
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Thank you @agila5, I integrated your suggestion for now, to try and resubmit asap to CRAN. We can think later indeed of a wrapper. @luukvdmeer, since tests passed now on GHA as well I will push to this same branch the NEWS.md, DESCRIPTION and cran-comments.md files. Sounds good?
Due to CRAN errors on r-devel that I find hard to debug with the time limit, I commented out the test causing the issue. My impression is that the
match
algorithm from base R is going to change in the next r version andexpect_setqueal()
, which relies on it, does not support anymoresfnetwork
objects. We can think of another way to perform that test in any case, since I think it could be better structured.