Skip to content

Make sure that weights=NA is documented #1810

Open
@szhorvat

Description

@szhorvat

In igraph, the weights function parameter typically takes the following values:

  • A vector of edge weights
  • NULL means: use the weight attribute automatically if present
  • NA means: do not use weights at all, regardless of attributes

This is documented for some, but not all functions. For example, it is not documented for betweenness and closeness.

It is causing confusion for users. See this SO question with an incorrect and highly voted answer: https://stackoverflow.com/q/16129233/695132

This issue is to:

  • review which doc pages lack this information and add it
  • think about a central location where this could be explained; add it to the tutorial?
  • check which functions do not follow this convention and point this out very clearly in their documentation; an example is modularity()

CC @maelle

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions