Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

as.network.data.frame test trips

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
testing

Research direction

Start by running the bipartite-network test in tests/testthat/test-dataframe.R around lines 568–581 and inspect the warning from as.network.data.frame(). Trace the behavior through network/R/coercion.R:323 and network/R/dataframe.R:490 and 233. Done means the test no longer trips unexpectedly while the intended bipartite-network behavior remains covered.

Written by the indexing model from the issue text.

Description

bug

Test is tripping:

Warning (test-dataframe.R:568:3): bipartite networks work
3 arguments not used by format '`bipartite` is `TRUE`, but the `vertices` you provided contain names that are not present in `x` (i.e. you have isolates).'
Backtrace:
     ▆
  1. ├─testthat::expect_error(...) at test-dataframe.R:568:2
  2. │ └─testthat:::quasi_capture(...)
  3. │   ├─testthat (local) .capture(...)
  4. │   │ └─base::withCallingHandlers(...)
  5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  6. ├─network::as.network(...)
  7. └─network::as.network.data.frame(...) at network/R/coercion.R:323:12
  8.   └─network:::.prep_bipartite_vertices(...) at network/R/dataframe.R:490:6
  9.     ├─base::stop(...) at network/R/dataframe.R:233:6
 10.     │ └─base::.makeMessage(..., domain = domain)
 11.     │   └─base::lapply(list(...), as.character)
 12.     └─base::sprintf(...)

which is this fragment

https://github.com/statnet/network/blob/5fb95d2feddfd2a0fa3f234a102fe2992203c7c7/tests/testthat/test-dataframe.R#L568-L581

As this is related to bipartite networks it may very likely be related to problems in #64, #65,

Dominant language
R
Stars
20
Forks
7
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from statnet/network

All issues in statnet/network

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.