зеркало из https://github.com/microsoft/wpa.git
docs: add example and improve docs (#205)
This commit is contained in:
Родитель
e744c0d019
Коммит
822c56ca5b
|
@ -13,9 +13,12 @@
|
|||
#' averages of.
|
||||
#' @param return Character vector specifying what to return, defaults to "plot".
|
||||
#' Valid inputs are "plot" and "table".
|
||||
#' @param low String specifying colour HEX code to use for low-value metrics.
|
||||
#' @param mid String specifying colour HEX code to use for mid-value metrics.
|
||||
#' @param high String specifying colour HEX code to use for high-value metrics.
|
||||
#' @param low String specifying colour code to use for low-value metrics.
|
||||
#' Arguments are passed directly to `ggplot2::scale_fill_gradient2()`.
|
||||
#' @param mid String specifying colour code to use for mid-value metrics.
|
||||
#' Arguments are passed directly to `ggplot2::scale_fill_gradient2()`.
|
||||
#' @param high String specifying colour code to use for high-value metrics.
|
||||
#' Arguments are passed directly to `ggplot2::scale_fill_gradient2()`.
|
||||
#' @param textsize A numeric value specifying the text size to show in the plot.
|
||||
#'
|
||||
#' @import dplyr
|
||||
|
@ -33,6 +36,9 @@
|
|||
#' # Heatmap plot is returned by default
|
||||
#' keymetrics_scan(sq_data)
|
||||
#'
|
||||
#' # Heatmap plot with custom colours
|
||||
#' keymetrics_scan(sq_data, low = "purple", high = "yellow")
|
||||
#'
|
||||
#' # Return summary table
|
||||
#' keymetrics_scan(sq_data, hrvar = "LevelDesignation", return = "table")
|
||||
#'
|
||||
|
|
|
@ -38,11 +38,14 @@ averages of.}
|
|||
\item{return}{Character vector specifying what to return, defaults to "plot".
|
||||
Valid inputs are "plot" and "table".}
|
||||
|
||||
\item{low}{String specifying colour HEX code to use for low-value metrics.}
|
||||
\item{low}{String specifying colour code to use for low-value metrics.
|
||||
Arguments are passed directly to \code{ggplot2::scale_fill_gradient2()}.}
|
||||
|
||||
\item{mid}{String specifying colour HEX code to use for mid-value metrics.}
|
||||
\item{mid}{String specifying colour code to use for mid-value metrics.
|
||||
Arguments are passed directly to \code{ggplot2::scale_fill_gradient2()}.}
|
||||
|
||||
\item{high}{String specifying colour HEX code to use for high-value metrics.}
|
||||
\item{high}{String specifying colour code to use for high-value metrics.
|
||||
Arguments are passed directly to \code{ggplot2::scale_fill_gradient2()}.}
|
||||
|
||||
\item{textsize}{A numeric value specifying the text size to show in the plot.}
|
||||
}
|
||||
|
@ -57,6 +60,9 @@ Returns a heatmapped table by default, with options to return a table.
|
|||
# Heatmap plot is returned by default
|
||||
keymetrics_scan(sq_data)
|
||||
|
||||
# Heatmap plot with custom colours
|
||||
keymetrics_scan(sq_data, low = "purple", high = "yellow")
|
||||
|
||||
# Return summary table
|
||||
keymetrics_scan(sq_data, hrvar = "LevelDesignation", return = "table")
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче