-
Notifications
You must be signed in to change notification settings - Fork 1
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
unexpected behaviour when a layer has no intralayer links #3
Comments
@garciacallejas Thank you for finding this. We are on it |
@garciacallejas Thank you for finding the issue and helping us improve the package. |
Thank you, @Geutg! I can confirm it works now, with a caveat: at least when there is one or more empty layers, the list_of_layers needs all layers to be tibbles, not standard data frames. That's ok, but perhaps you can mention that explicitly in the documentation. Feel free to reuse the following code to check it out:
|
@garciacallejas you are correct, thank you for the useful feedback. |
I am generating a series of in silico multilayer networks. It may be the case that in a given network, one or more layers will have nodes with valid interlayer links but no intralayer links. This would be coded in interlayer links appearing in the dataframe passed to the
interlayer_links
argument ofcreate_multilayer_network
, but that layer not appearing as an element of the list passed tolist_of_layers
. Note that that list is named, so the function should be able to identify which layers have valid intralayer links or not.This, however, generates a wrong multilayer, whereby it creates intralayer links for the layer that should have none. I think it takes the elements of the list of intralayer links sequentially, without discarding the layers not present in that list. So, if I have three layers, where layer 2 has no intralayer links, that layer will not be present in the intralayer links list. But the function will assume that it is, assigning the intralayer links of layer 3 to layer 2 and leaving intralayer 3 empty.
Below is a minimal example to reproduce the behaviour. Thank you for your work on the package!
David
The text was updated successfully, but these errors were encountered: