Conversation
`describe_nodes()` gave every node the first mode's name, because `ifelse()` returns as many values as its first argument holds. `mode_nodes()` also counted the whole network as one mode, unless the network was two-mode, and `net_modes()` read no more than two modes from an igraph 'lvl' attribute. Each mode now carries its own count and name. Closes #174 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
==========================================
+ Coverage 83.06% 83.42% +0.36%
==========================================
Files 42 42
Lines 6718 6783 +65
==========================================
+ Hits 5580 5659 +79
+ Misses 1138 1124 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates manynet to 2.3.2 with a focus on correctly describing/counting nodes across networks with 3+ modes (including igraph objects using a lvl attribute), plus accompanying tests and documentation/news updates.
Changes:
- Extend mode counting to support 3+ modes for
stocnetandigraph(lvl) objects. - Fix
describe_nodes()to correctly name/count modes beyond two. - Add functional tests and update docs/NEWS/versioning/contributing guidance.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-functional_prints.R | Adds coverage for describe_nodes() / multimode counting on 3-mode stocnet and igraph (lvl) cases. |
| R/measure_properties.R | Updates net_modes.igraph(), mode_nodes.*(), and introduces .count_modes() helper for multimode counts. |
| R/class_describe.R | Fixes describe_nodes() mode naming/pluralisation behavior for 3+ modes. |
| NEWS.md | Adds 2.3.2 release notes for the multimode describe/count changes. |
| man/measure_dims.Rd | Updates documentation to describe per-mode counts for multimodal networks. |
| DESCRIPTION | Bumps package version to 2.3.2. |
| .github/CONTRIBUTING.md | Adds NEWS bullet naming guidance (generic vs method-specific). |
Files not reviewed (1)
- man/measure_dims.Rd: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ot its sign - Fixed `to_unsigned.data.frame()` erroring on a signed edgelist - now drops the ties of the other sign, as the other methods do - now reads signs held as negative weights as well as in a 'sign' column - Fixed `to_unsigned.network()` ignoring its `keep` argument 'both' excludes no tie, so it records no exclusion. None of the transformation items names the taking of a magnitude, so it goes unrecorded until one does. Whether an exported positive-ties guard should join it is open as #176. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`delete_nodes()` had no 'stocnet' method, so it went through igraph, where the changes travel as a graph attribute and are not renumbered with the nodes. It now delegates to `keep_nodes()`, which renumbers every component together. A projection discards a whole mode, so a change about a node of that mode describes a node the result does not have. `to_mode1()` and `to_mode2()` now drop those and renumber the rest by rank among the nodes they keep. Both errored on `validate_stocnet()` before, on any network with changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…r a time A moment is a moment however it is written. How a moment relates to the one before it is a separate question, which `info$update` answers, so naming a column 'time' does not by itself make a network a panel. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The date belongs to the event and not to the attendance: every tie to an event carries the same date, and no woman carries one of her own. Each of the 14 events now enters the network on the date it is held, which the changes component records, so `is_changing()` marks the network. An `active` node attribute gives the starting state, as `fict_starwars` has. The unscoped network is unchanged: 32 nodes, 89 ties, the same matrix. `to_time()` returns the events held so far. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three tests reached for `igraph::vcount()`, `igraph::delete_vertex_attr()`, and the class a projection happens to return. They now use `net_nodes()`, coerce with `as_igraph()` where the comparison is an igraph one, and assert that a projection returns the class it was given. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Package
snet_verbositylevels, 'quiet', 'normal', and 'verbose'snet_info()andsnet_success()report from 'normal'snet_minor_info()and thesnet_progress_*()functions report from 'verbose'snet_warn()andsnet_unavailable()so that neither is silenced (closessnet_unavailable()does nothing under the default quiet verbosity #169)Classes
describe_nodes()on networks of three or more modes (closes print() names only the first mode for a three-mode network #174)keep_nodes()to drop and reindex$missings(closes to_subgraph() errors on stocnet and mnet objects #173)reserved_cols()now names every out-of-range id, instead of erroringvalidate_stocnet()to read a node 'id' as an id and not a labelvalidate_stocnet()to read a tie 'date' as another name for a timeCoercion
as_igraph.stocnet()on multimodal and multilevel networks (closes to_layer() corrupts arc endpoints when it drops nodes #170)Manipulating
delete_nodes.stocnet()to reindex every component, including changesModifying
to_mode1.stocnet()andto_mode2.stocnet()to carry changeskeep = "both"toto_unsigned(), which keeps every tie but not its signto_unsigned.data.frame()erroring on a signed edgelistto_unsigned.network()ignoring itskeepargumentto_layer()pointing arcs at the wrong nodes (closes to_layer() corrupts arc endpoints when it drops nodes #170)Marking
is_directed()on a network tied within a level as well as betweenis_multilevel.igraph()looping throughtie_is_twomode()layer_is_directed(), reporting each layer of a network (closes is_directed() returns FALSE for a two-mode network with a directed layer #171)Measuring
mode_nodes()to count the nodes in each of three or more modesnet_modes.igraph()to count the levels an igraph 'lvl' attribute recordsData
ison_southern_womento be changing by event dates