Skip to content

Commit

Permalink
Merge pull request #97 from stocnet/develop
Browse files Browse the repository at this point in the history
Deprecated functions `manynet`
  • Loading branch information
auzaheta authored Sep 2, 2024
2 parents b83a7ef + 7009ca7 commit 57bf431
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache_version: 2
cache-version: 2
extra-packages: any::rcmdcheck
needs: check

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prchecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache_version: 2
cache-version: 2
extra-packages: |
any::pkgbuild
any::lintr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache_version: 2
cache-version: 2
extra-packages: any::covr
needs: coverage

Expand Down
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Suggests:
ggraph,
migraph,
manynet,
patchwork,
broom,
lmtest
VignetteBuilder: knitr
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# goldfish 1.6.9

* Update deprecated functions in the vignettes from `manynet`.
* Solve issue on `Makevars.in` file that produced a note when check as CRAN.

# goldfish 1.6.8
Expand Down
6 changes: 3 additions & 3 deletions vignettes/teaching1.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ library(ggraph)
library(migraph)
# The network at the beginning
callNetworkBgn <- as.matrix(callNetwork)
autographr(callNetworkBgn, labels = FALSE, layout = "fr")
graphr(callNetworkBgn, labels = FALSE, layout = "fr")

# The network at half time
callNetworkHlf <- as.matrix(
Expand All @@ -259,15 +259,15 @@ callNetworkHlf <- as.matrix(
as_igraph() |>
add_node_attribute("floor", actors$floor)

autographr(callNetworkHlf, labels = FALSE, layout = "fr") +
graphr(callNetworkHlf, labels = FALSE, layout = "fr") +
geom_node_point(aes(color = as.factor(floor)), size = 2, show.legend = FALSE)

# The network at the end
callNetworkEnd <- as.matrix(callNetwork, time = max(calls$time) + 1) |>
as_igraph() |>
add_node_attribute("floor", actors$floor)

autographr(callNetworkEnd, labels = FALSE, layout = "fr") +
graphr(callNetworkEnd, labels = FALSE, layout = "fr") +
geom_node_point(aes(color = as.factor(floor)), size = 2, show.legend = FALSE)


Expand Down
6 changes: 3 additions & 3 deletions vignettes/teaching2.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,15 @@ endNet <- as.matrix(bilatnet, time = as.numeric(as.POSIXct("1970-01-01"))) |>
add_node_attribute("gdp", endStates$gdp)

# logical value indicating if states where present and with agreements
isStateActiveStart <- startStates$present & node_degree(startNet) > 0
isStateActiveEnd <- endStates$present & node_degree(endNet) > 0
isStateActiveStart <- startStates$present & node_deg(startNet) > 0
isStateActiveEnd <- endStates$present & node_deg(endNet) > 0
isStateActive <- isStateActiveStart | isStateActiveEnd

# subset networks to active states
startNet <- delete_nodes(startNet, !isStateActive)
endNet <- delete_nodes(endNet, !isStateActive)

autographs(list(startNet, endNet), layout = "fr")
graphs(list(startNet, endNet), layout = "fr")
```

What can we observe?
Expand Down

0 comments on commit 57bf431

Please sign in to comment.