Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions R/structural.properties.R
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,17 @@ degree_distribution <- function(graph, cumulative = FALSE, ...) {
#' was not requested.} \item{inbound_edges}{Numeric vector, the inbound edge
#' for each vertex, or `NULL`, if it was not requested.}
#'
#' For `all_shortest_paths()` a list is returned, each list element
#' contains a shortest path from `from` to a vertex in `to`. The
#' shortest paths to the same vertex are collected into consecutive elements
#' of the list.
#' For `all_shortest_paths()` a list is returned:
#' \item{vpaths}{This is a list. Each list element
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need \describe{} here? See https://developer.r-project.org/parseRd.pdf .

Yes, in R documentation (.Rd) files, you need to use \describe{} if you want to use \item{}{}.

Explanation:

  • \describe{} is used to create a description list in R documentation.
  • \item{}{} defines individual list items, where the first argument is the term being described, and the second argument is its description.

Example:

\describe{
  \item{param1}{This is the first parameter description.}
  \item{param2}{This is the second parameter description.}
}

Alternative:

  • If you don’t need a term-description list and just want bullet points, you can use \itemize{} instead:
    \itemize{
      \item First bullet point.
      \item Second bullet point.
    }

So, yes, \describe{} is required for \item{}{} in .Rd files.

#' contains the vertices of a shortest path from `from` to a vertex in `to`.
#' The shortest paths to the same vertex are collected
#' into consecutive elements of the list.}
#' \item{epaths}{This is a list similar to vpaths,
#' but the vectors of the list contain the edge ids along the shortest paths,
#' instead of the vertex ids.}
Comment thread
krlmlr marked this conversation as resolved.
#' \item{nrgeo}{A vector in which each element is the number of shortest paths
#' (geodesics) from `from` to the corresponding vertex in `to`.}
#' \item{res}{Deprecated}
#'
#' For `mean_distance()` a single number is returned if `details=FALSE`,
#' or a named list with two entries: `res` is the mean distance as a numeric
Expand Down
2 changes: 1 addition & 1 deletion man/closeness.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions man/distances.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.