Standardize API parameter naming: nodes → n, vids → vertices
          #2450
        
          
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Addresses inconsistent parameter naming across the API where "nodes", "vids", and "vertices" were used interchangeably for similar concepts, reducing predictability.
Changes
Implements the naming convention agreed in issue discussion:
nfor scalar vertex count (graph generators)verticesfor vertex sequences (centrality, structural, path functions)Graph generators (
nodes→n)sample_traits_callaway(),sample_traits(),sample_grg()sample_pref(),sample_asym_pref(),sample_forestfire()Centrality functions (
vids→vertices)page_rank(),closeness(),strength(),harmonic_centrality(),diversity()Centrality functions (
nodes→vertices)alpha_centrality(),power_centrality()Structural properties (
nodes→vertices)constraint(),ego(),ego_size(),make_ego_graph()Path functions (
vids→vertices)eccentricity()Example
Deprecated wrappers updated to maintain backward compatibility.
Original prompt
This section details on the original issue you should resolve
<issue_title>Inconsistent naming: "vertex" vs "node"</issue_title>
<issue_description>In the interest of predictability, we should ensure that the API uses "vertex" consistently and avoids "node".
Currently, "node" us used:
vids, see Inconsistent naming of vertex selector parameters #691sample_traits_callaway()and other similar functions. Grep for@param nodes.This issue refers specifically to the API, which should be predictable. Using both "node" and "vertex" in the documentation text is less of an issue.</issue_description>
Comments on the Issue (you are @copilot in this section)
@schochastics I tried to gather all functions that use `c("nodes", "vids", "v","vertex", "vertices","n")` My suggestion to consolidate:nfor number of nodes (scalar)verticesfor subset of nodes (vector of vertex ids/names, could be a single vertex though)v(orvertex) for a specific vertex (scalar, can neverf be a vector)This would eliminate
vidsandnodes@szhorvat What do you think?