You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example shows how %e%<- and [<-.network (with names.eval passed) behave similarly with no missing edges, but the latter errors when an edge is missing.
This is easily fixed, but it's a "philosophical" question: if an edge is marked as missing (i.e., has its na attribute set to TRUE), what value should this call assign to it?
In the above case, what should the attribute attr4 of edge (2,3) be assigned?
Nothing.
"e".
NA (NA of type logical).
NA_character_ (NA of the same type as the assigned value).
Whether an edge is missing shouldn't have any bearing on what attributes it carries. Bear in mind here that, to network, an "edge" is a data object saying that there's some kind of information regarding a set of vertices that needs to be stored. The na attribute is a standard way of recording that the adjacency of that set is unknown, but there's no rule that says that you can't store other information on that set. How that information gets reported back will vary, of course: for instance, as.matrix(nw,attrname="attr2") will report an NA for the missing edge, as it should. But you should be able to store the information without it getting garbled. So this seems to be a bug (looks like it arises from an incorrect assumption that is.adjacent won't return NA ). Too late for the 1.19.0 release, but should be fixed for the next one....
The following example shows how
%e%<-
and[<-.network
(withnames.eval
passed) behave similarly with no missing edges, but the latter errors when an edge is missing.the error on the last line being
with traceback
The text was updated successfully, but these errors were encountered: