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

Allow displaying plots when there are no alter-alter ties #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattwigway
Copy link
Contributor

When there are no alter-alter ties, displaying an ego graph fails (#86). This is because the weight for the ego-alter ties is set to the minimum weight of all ties currently in the graph, but in this case there are no ties in the graph. This fix adds a special case for that situation. If all weights are NA (or if the entire weights vector is NULL), the weight is set to 1 for all ties (including both the intended ego-alter ties, as well as any aaties with NA weights; modifying aaties with null weights is the previous behavior but this might not be desirable).

Also, just above the changed code there is the line set.seed(1337). Is that intentional? Seems like it could cause unexpected results in external code that relies on random numbers and isn't expecting global RNG state to be modified.

krivit added a commit that referenced this pull request Mar 4, 2025
@krivit krivit requested a review from tilltnet March 4, 2025 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant