diff --git a/R/network_p2p.R b/R/network_p2p.R index a9ac2464..9673c235 100644 --- a/R/network_p2p.R +++ b/R/network_p2p.R @@ -7,6 +7,7 @@ #' #' @description #' `r lifecycle::badge('experimental')` +#' #' Pass a data frame containing a person-to-person query and return a network visualization. #' Options are available for community detection using either the Louvain or the Leiden algorithms. #' @@ -14,23 +15,25 @@ #' @param data Data frame containing a person-to-person query. #' @param hrvar String containing the label for the HR attribute. #' @param display String determining what output to return. Valid values include: -#' - "hrvar" (default): compute analysis or visuals without computing communities. -#' - "louvain": compute analysis or visuals with community detection, using the Louvain +#' - `"hrvar"` (default): compute analysis or visuals without computing communities. +#' - `"louvain"`: compute analysis or visuals with community detection, using the Louvain #' algorithm. -#' - "leiden": compute analysis or visuals with community detection, using the Leiden algorithm. +#' - `"leiden"`: compute analysis or visuals with community detection, using the Leiden algorithm. #' This requires all the pre-requisites of the **leiden** package installed, #' which includes Python and **reticulate**. +#' #' @param return String specifying what output to return. Defaults to "plot". #' Valid return options include: -#' - 'plot': return a network plot. -#' - 'sankey': return a sankey plot combining communities and HR attribute. This is only valid if +#' - `'plot'`: return a network plot. +#' - `'sankey'`: return a sankey plot combining communities and HR attribute. This is only valid if #' a community detection method is selected at `display`. -#' - 'table': return a vertex summary table with counts in communities and HR attribute. -#' - 'data': return a vertex data file that matches vertices with communities and HR attributes. -#' - 'describe': return a list of data frames which describe each of the identified communities. +#' - `'table'`: return a vertex summary table with counts in communities and HR attribute. +#' - `'data'`: return a vertex data file that matches vertices with communities and HR attributes. +#' - `'describe'`: return a list of data frames which describe each of the identified communities. #' The first data frame is a summary table of all the communities. This is only valid if a community #' detection method is selected at `display`. -#' - 'network': return igraph object. +#' - `'network'`: return igraph object. +#' #' @param path File path for saving the PDF output. Defaults to a timestamped path based on current parameters. #' @param desc_hrvar Character vector of length 3 containing the HR attributes to use when returning the #' "describe" output. See `network_describe()`. diff --git a/man/network_p2p.Rd b/man/network_p2p.Rd index ad9e3dd3..f89fb1bd 100644 --- a/man/network_p2p.Rd +++ b/man/network_p2p.Rd @@ -29,10 +29,10 @@ network_p2p( \item{display}{String determining what output to return. Valid values include: \itemize{ -\item "hrvar" (default): compute analysis or visuals without computing communities. -\item "louvain": compute analysis or visuals with community detection, using the Louvain +\item \code{"hrvar"} (default): compute analysis or visuals without computing communities. +\item \code{"louvain"}: compute analysis or visuals with community detection, using the Louvain algorithm. -\item "leiden": compute analysis or visuals with community detection, using the Leiden algorithm. +\item \code{"leiden"}: compute analysis or visuals with community detection, using the Leiden algorithm. This requires all the pre-requisites of the \strong{leiden} package installed, which includes Python and \strong{reticulate}. }} @@ -40,15 +40,15 @@ which includes Python and \strong{reticulate}. \item{return}{String specifying what output to return. Defaults to "plot". Valid return options include: \itemize{ -\item 'plot': return a network plot. -\item 'sankey': return a sankey plot combining communities and HR attribute. This is only valid if +\item \code{'plot'}: return a network plot. +\item \code{'sankey'}: return a sankey plot combining communities and HR attribute. This is only valid if a community detection method is selected at \code{display}. -\item 'table': return a vertex summary table with counts in communities and HR attribute. -\item 'data': return a vertex data file that matches vertices with communities and HR attributes. -\item 'describe': return a list of data frames which describe each of the identified communities. +\item \code{'table'}: return a vertex summary table with counts in communities and HR attribute. +\item \code{'data'}: return a vertex data file that matches vertices with communities and HR attributes. +\item \code{'describe'}: return a list of data frames which describe each of the identified communities. The first data frame is a summary table of all the communities. This is only valid if a community detection method is selected at \code{display}. -\item 'network': return igraph object. +\item \code{'network'}: return igraph object. }} \item{path}{File path for saving the PDF output. Defaults to a timestamped path based on current parameters.} @@ -82,6 +82,7 @@ method.} } \description{ \ifelse{html}{\out{Experimental lifecycle}}{\strong{Experimental}} + Pass a data frame containing a person-to-person query and return a network visualization. Options are available for community detection using either the Louvain or the Leiden algorithms. }