Comments (1)
I just ran into this. It looks like the bug was introduced at d88b167 by this line, which calls unfocus()
at the top of the function in an attempt to make sure that the new focus()
functionality doesn't mess things up; but unfocus
can't handle bare lists, so it throws an error.
I assume the fix is to put the unfocus()
call inside the if
conditions that immediately follow the current call and that handle the bare list functionality. But I don't understand focus()
very well yet, so I'll hold back on submitting a PR that might cause some new problem.
In the meantime, I think the bug can be worked around fairly painlessly by using do.call()
(or rlang::exec()
) to pass the list to bind_graphs()
elementwise.
Here's a reprex showing the workaround using the example from the docs and above:
library(tidygraph)
#>
#> Attaching package: 'tidygraph'
#> The following object is masked from 'package:stats':
#>
#> filter
graph <- create_notable('bull')
new_graph <- create_notable('housex')
graphs <- list(graph, new_graph)
example_from_docs <- graph %>% tidygraph::bind_graphs(new_graph)
workaround <- do.call(bind_graphs, graphs)
igraph::identical_graphs(example_from_docs, workaround)
#> [1] TRUE
Created on 2024-05-20 with reprex v2.1.0
from tidygraph.
Related Issues (20)
- Add node_is_connected()
- add "resolution" argument to group_louvain
- Error: unable to load R code in package ‘tidygraph’ HOT 1
- access .orig_data after a graph contraction HOT 1
- New CRAN release timeline? HOT 1
- Release tidygraph 1.2.3
- `trunc_mat()` deprecated in tibble
- betweenness_centrality() does not return normalized values HOT 1
- Size aesthetic is deprecated for edges HOT 1
- Upkeep for tidygraph (2023)
- Feature request: add support for class "dagitty" to as_tbl_graph HOT 1
- Release tidygraph 1.3.0 HOT 5
- Printing grouped til_graphs will error if grouping is an expression
- Creating a tbl_graph from data frames with sticky columns
- Add new features from igraph HOT 2
- igraph 2.0.0 installation failed HOT 1
- dfs_rank seems to give wrong results with v1.3.1
- bfs_rank returns 0 instead of NA for unreachable nodes with tidygraph v1.3.1
- Regression in edgelist import with as_tbl_graph HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidygraph.