зеркало из https://github.com/microsoft/wpa.git
docs: format network_p2p()
This commit is contained in:
Родитель
1aa0874a94
Коммит
c04b457c9c
|
@ -7,6 +7,7 @@
|
||||||
#'
|
#'
|
||||||
#' @description
|
#' @description
|
||||||
#' `r lifecycle::badge('experimental')`
|
#' `r lifecycle::badge('experimental')`
|
||||||
|
#'
|
||||||
#' Pass a data frame containing a person-to-person query and return a network visualization.
|
#' 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.
|
#' 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 data Data frame containing a person-to-person query.
|
||||||
#' @param hrvar String containing the label for the HR attribute.
|
#' @param hrvar String containing the label for the HR attribute.
|
||||||
#' @param display String determining what output to return. Valid values include:
|
#' @param display String determining what output to return. Valid values include:
|
||||||
#' - "hrvar" (default): compute analysis or visuals without computing communities.
|
#' - `"hrvar"` (default): compute analysis or visuals without computing communities.
|
||||||
#' - "louvain": compute analysis or visuals with community detection, using the Louvain
|
#' - `"louvain"`: compute analysis or visuals with community detection, using the Louvain
|
||||||
#' algorithm.
|
#' 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,
|
#' This requires all the pre-requisites of the **leiden** package installed,
|
||||||
#' which includes Python and **reticulate**.
|
#' which includes Python and **reticulate**.
|
||||||
|
#'
|
||||||
#' @param return String specifying what output to return. Defaults to "plot".
|
#' @param return String specifying what output to return. Defaults to "plot".
|
||||||
#' Valid return options include:
|
#' Valid return options include:
|
||||||
#' - 'plot': return a network plot.
|
#' - `'plot'`: return a network plot.
|
||||||
#' - 'sankey': return a sankey plot combining communities and HR attribute. This is only valid if
|
#' - `'sankey'`: return a sankey plot combining communities and HR attribute. This is only valid if
|
||||||
#' a community detection method is selected at `display`.
|
#' a community detection method is selected at `display`.
|
||||||
#' - 'table': return a vertex summary table with counts in communities and HR attribute.
|
#' - `'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.
|
#' - `'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.
|
#' - `'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
|
#' 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`.
|
#' 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 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
|
#' @param desc_hrvar Character vector of length 3 containing the HR attributes to use when returning the
|
||||||
#' "describe" output. See `network_describe()`.
|
#' "describe" output. See `network_describe()`.
|
||||||
|
|
|
@ -29,10 +29,10 @@ network_p2p(
|
||||||
|
|
||||||
\item{display}{String determining what output to return. Valid values include:
|
\item{display}{String determining what output to return. Valid values include:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item "hrvar" (default): compute analysis or visuals without computing communities.
|
\item \code{"hrvar"} (default): compute analysis or visuals without computing communities.
|
||||||
\item "louvain": compute analysis or visuals with community detection, using the Louvain
|
\item \code{"louvain"}: compute analysis or visuals with community detection, using the Louvain
|
||||||
algorithm.
|
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,
|
This requires all the pre-requisites of the \strong{leiden} package installed,
|
||||||
which includes Python and \strong{reticulate}.
|
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".
|
\item{return}{String specifying what output to return. Defaults to "plot".
|
||||||
Valid return options include:
|
Valid return options include:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item 'plot': return a network plot.
|
\item \code{'plot'}: return a network plot.
|
||||||
\item 'sankey': return a sankey plot combining communities and HR attribute. This is only valid if
|
\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}.
|
a community detection method is selected at \code{display}.
|
||||||
\item 'table': return a vertex summary table with counts in communities and HR attribute.
|
\item \code{'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 \code{'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{'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
|
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}.
|
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.}
|
\item{path}{File path for saving the PDF output. Defaults to a timestamped path based on current parameters.}
|
||||||
|
@ -82,6 +82,7 @@ method.}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
\ifelse{html}{\out{<a href='https://www.tidyverse.org/lifecycle/#experimental'><img src='figures/lifecycle-experimental.svg' alt='Experimental lifecycle'></a>}}{\strong{Experimental}}
|
\ifelse{html}{\out{<a href='https://www.tidyverse.org/lifecycle/#experimental'><img src='figures/lifecycle-experimental.svg' alt='Experimental lifecycle'></a>}}{\strong{Experimental}}
|
||||||
|
|
||||||
Pass a data frame containing a person-to-person query and return a network visualization.
|
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.
|
Options are available for community detection using either the Louvain or the Leiden algorithms.
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче