Comments (13)
from rigraph.
I get no failure for tidygraph with the current igraph version @krlmlr
from rigraph.
from rigraph.
from rigraph.
rcmfs also uses from()
instead of .from()
but I could not locate the package source so we'll have to email the maintainer.
from rigraph.
netropy error.
Error in igraph::distances(g) :
At vendor/cigraph/src/paths/dijkstra.c:128 : Weights must not contain NaN values. Invalid value
Backtrace:
1. netropy::assoc_graph(df.att.ed, 0.15)
2. ggraph::ggraph(ag, layout = "stress")
at netropy/R/assoc_graph.R:45:3
5. ggraph:::create_layout.default(graph, layout, ...)
7. ggraph:::create_layout.tbl_graph(graph, layout, ...)
9. ggraph:::layout_to_table.character(...)
10. ggraph (local) layout_fun(graph, circular = circular, ...)
11. graphlayouts::layout_with_stress(...)
12. graphlayouts:::.layout_with_stress_dim(...)
13. igraph::distances(g)
from rigraph.
in netropy
structure(list(7, FALSE, c(1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 3,
4, 5, 6, 4, 5, 6, 5, 6, 6), c(0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
2, 2, 2, 2, 3, 3, 3, 4, 4, 5), NULL, NULL, NULL, NULL, list(c(1,
0, 1), structure(list(), names = character(0)), list(name = c("status",
"gender", "office", "years", "age", "practice", "lawschool")),
list(weight = c(NA_real_, NA_real_, NA_real_, NA_real_, NA_real_,
NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_,
NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_,
NA_real_, NA_real_, NA_real_, NA_real_))), <environment>), class = "igraph")
Error in igraph::distances(g) :
At vendor/cigraph/src/paths/dijkstra.c:128 : Weights must not contain NaN values. Invalid value
Backtrace:
1. netropy::assoc_graph(df.att.ed, 0.15)
2. ggraph::ggraph(ag, layout = "stress")
at netropy/R/assoc_graph.R:45:3
5. ggraph:::create_layout.default(graph, layout, ...)
7. ggraph:::create_layout.tbl_graph(graph, layout, ...)
9. ggraph:::layout_to_table.character(...)
10. ggraph (local) layout_fun(graph, circular = circular, ...)
11. graphlayouts::layout_with_stress(...)
12. graphlayouts:::.layout_with_stress_dim(...)
13. igraph::distances(g)
The error is somewhere in ggraph/graphlayouts. I don't understand when we changed what distances()
accepts as input. Or did we change graph_from_adjacency_matrix()
somehow? It's that call that creates the NA weights.
from rigraph.
Reg BCT, I do not know where the package source is. I think #1431 will fix the problem on our side.
I however note that BCT should update its usage of igraph:
https://github.com/cran/BCT/blob/23e22470683b417c6da33cd3c55ab2c29d8670cf/R/process_bct.R#L46
should use make_lattice()
, for instance.
from rigraph.
https://github.com/termehs/netropy
library(netropy)
df.att <- lawdata[[4]]
df.att.ed <- data.frame(
status = df.att$status,
gender = df.att$gender,
office = df.att$office - 1,
years = ifelse(df.att$years <= 3, 0,
ifelse(df.att$years <= 13, 1, 2)
),
age = ifelse(df.att$age <= 35, 0,
ifelse(df.att$age <= 45, 1, 2)
),
practice = df.att$practice,
lawschool = df.att$lawschool - 1
)
assoc_graph(df.att.ed, 0.15)
#> Error in igraph::distances(g): At vendor/cigraph/src/paths/dijkstra.c:128 : Weights must not contain NaN values. Invalid value
Created on 2024-07-18 with reprex v2.1.0
from rigraph.
BCT still shows failures, unfortunately.
from rigraph.
Reg BCT
s <- c("2", "11", "00", "10", "12", "011", "020", "021", "012", "022",
"0100", "0102", "0101")
init_g=igraph::graph.empty(n=1)
#> Warning: `graph.empty()` was deprecated in igraph 2.0.4.
#> ℹ Please use `make_empty_graph()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
igraph::V(init_g)$name=""
g = init_g
for(word in c(s)){
# turns "10100" into c("1","10","101","1010", 10100")
subwords = stringr::str_sub(word, 1, 1:nchar(word))
# make a graph long enough to hold all those sub-words + start node
subg = igraph::graph.lattice(length(subwords)+1,directed=TRUE)
# set vertex nodes to start node plus sub-words
igraph::V(subg)$name=c("",subwords)
# merge *by name* into the existing graph
g = igraph::graph.union(g, subg)
}
#> Warning: `graph.lattice()` was deprecated in igraph 2.0.4.
#> ℹ Please use `make_lattice()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> Warning: `graph.union()` was deprecated in igraph 2.0.0.
#> ℹ Please use `union.igraph()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> Error in getval(w, name): argument "newval" is missing, with no default
Created on 2024-07-19 with reprex v2.1.0
Backtrace:
1. igraph::graph.union(g, subg)
2. igraph:::union.igraph(byname = byname, ...)
at rigraph/R/operators.R:29:3
3. igraph:::.igraph.graph.union.or.intersection(...)
at rigraph/R/operators.R:448:3
4. igraph:::rename.attr.if.needed("g", newgraphs)
at rigraph/R/operators.R:320:5
5. igraph (local) getval(w, name)
at rigraph/R/operators.R:151:7
from rigraph.
Replacing graph.lattice()
with make_lattice()
makes the error disappear!
s <- c("2", "11", "00", "10", "12", "011", "020", "021", "012", "022",
"0100", "0102", "0101")
init_g=igraph::graph.empty(n=1)
#> Warning: `graph.empty()` was deprecated in igraph 2.0.4.
#> ℹ Please use `make_empty_graph()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
igraph::V(init_g)$name=""
g = init_g
for(word in c(s)){
# turns "10100" into c("1","10","101","1010", 10100")
subwords = stringr::str_sub(word, 1, 1:nchar(word))
# make a graph long enough to hold all those sub-words + start node
subg = igraph::make_lattice(length(subwords)+1,directed=TRUE)
# set vertex nodes to start node plus sub-words
igraph::V(subg)$name=c("",subwords)
# merge *by name* into the existing graph
g = igraph::graph.union(g, subg)
}
#> Warning: `graph.union()` was deprecated in igraph 2.0.0.
#> ℹ Please use `union.igraph()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
Created on 2024-07-19 with reprex v2.1.0
from rigraph.
so the remaining mystery is netropy I suppose
from rigraph.
Related Issues (20)
- V(g) not the same as 1:vcount HOT 5
- `cluster_label_prop()` crashes R when using fixed labels HOT 6
- Export `.from` etc. with behavior similar to `dplyr::across()` HOT 1
- use lifecyle for layout.fruchterman.reingold()
- Remove/deprecate the functions using constructor_spec()? HOT 1
- deprecate neimode argument in bfs() for good
- `feedback_arc_set()` needs tests
- Add `igraph_feedback_vertex_set()`
- A weights vector in `local_scan`
- TODOs in `rinterface_extra.c`
- TODOs in tests HOT 17
- TODO in `src/igraph_vector.hpp` HOT 2
- TODOs in `socnet.R` HOT 7
- TODO in tkplot
- ensure max.print is used consistently in all of print.R
- Update `is_separator()` docs
- can indexing be made faster HOT 1
- can we remove the "## TODO: speed this up" in make.R?
- Add `igraph_find_cycle()`
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 rigraph.