luukvdmeer / sfnetworks

Tidy Geospatial Networks in R
https://luukvdmeer.github.io/sfnetworks/
Other
347 stars 20 forks source link

Allow node_key argument in network creation #53

Closed luukvdmeer closed 4 years ago

luukvdmeer commented 4 years ago

Is your feature request related to a problem? Please describe. Last month, tidygraph got an update. Where before the to and from columns of the edges always contained integers referring to the row number of the respective nodes in the node table, it is now also possible to have those columns containing character indices referring to a specific ID column in the nodes table (which has to contain characters). Which column to use for that, can then be specified with the node_key argument.

node_key The name of the column in nodes that character represented to and from columns should be matched against. If NA the first column is always chosen. This setting has no effect if to and from are given as integers.

Describe the solution you'd like Include the node_key argument also in sfnetwork construction functions.

luukvdmeer commented 4 years ago

Implemented in 0.3.1