Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as.network.data.frame test trips #83

Open
mbojan opened this issue Jul 4, 2023 · 0 comments
Open

as.network.data.frame test trips #83

mbojan opened this issue Jul 4, 2023 · 0 comments
Labels

Comments

@mbojan
Copy link
Member

mbojan commented Jul 4, 2023

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

expect_error(
as.network(x = bip_edge_df, directed = FALSE, vertices = bip_isolates_node_df,
bipartite = TRUE),
"`bipartite` is `TRUE`, but the `vertices` you provided contain names that are not present in `x`"
)
bip_isolates_node_df$is_actor <- !grepl("^e\\d$", bip_isolates_node_df$vertex.names)
bip_isoaltes_g <- as.network(x = bip_edge_df, directed = FALSE,
vertices = bip_isolates_node_df,
bipartite = TRUE)
expect_s3_class(
bip_isoaltes_g,
"network"
)

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

@mbojan mbojan added the bug label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant