-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from nanxstats/roxygen2md
Convert Rd syntax to Markdown
- Loading branch information
Showing
71 changed files
with
590 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ Suggests: | |
VignetteBuilder: knitr | ||
Encoding: UTF-8 | ||
RoxygenNote: 7.3.1 | ||
Roxygen: list(markdown = TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
#' The GSEA GenePattern Color Palettes | ||
#' The GSEA GenePattern color palettes | ||
#' | ||
#' Color palette inspired by the colors used in the | ||
#' heatmaps plotted by GSEA GenePattern. | ||
#' | ||
#' @param palette Palette type. | ||
#' Currently there is one available option: \code{"default"} | ||
#' (continuous palette with 12 base colors). | ||
#' Currently there is one available option: `"default"` | ||
#' (continuous palette with 12 base colors). | ||
#' @param n Number of individual colors to be generated. | ||
#' @param alpha Transparency level, a real number in (0, 1]. | ||
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details. | ||
#' See `alpha` in [grDevices::rgb()] for details. | ||
#' @param reverse Logical. Should the order of the colors be reversed? | ||
#' | ||
#' @export rgb_gsea | ||
#' | ||
#' @importFrom grDevices colorRamp rgb | ||
#' @importFrom scales manual_pal | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @note The 12 base colors used in this palette are derived from the | ||
#' \href{https://modulerepository.genepattern.org/gpModuleRepository/download/prod/module/?file=/HeatMapImage/broad.mit.edu:cancer.software.genepattern.module.analysis/00032/6/HeatMapImage.pdf}{HeatMapImage documentation}. | ||
#' [HeatMapImage documentation](https://modulerepository.genepattern.org/gpModuleRepository/download/prod/module/?file=/HeatMapImage/broad.mit.edu:cancer.software.genepattern.module.analysis/00032/6/HeatMapImage.pdf). | ||
#' | ||
#' @examples | ||
#' library("scales") | ||
|
@@ -44,7 +43,7 @@ rgb_gsea <- function(palette = c("default"), n = 12, alpha = 1, reverse = FALSE) | |
alpha_cols | ||
} | ||
|
||
#' The GSEA GenePattern Color Palettes | ||
#' The GSEA GenePattern color palettes | ||
#' | ||
#' Color palette inspired by the colors used in the | ||
#' heatmaps plotted by GSEA GenePattern. | ||
|
@@ -55,8 +54,7 @@ rgb_gsea <- function(palette = c("default"), n = 12, alpha = 1, reverse = FALSE) | |
#' | ||
#' @importFrom scales manual_pal | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @examples | ||
#' library("scales") | ||
|
@@ -68,19 +66,18 @@ pal_gsea <- function(palette = c("default"), n = 12, alpha = 1, reverse = FALSE) | |
manual_pal(unname(alpha_cols)) | ||
} | ||
|
||
#' The GSEA GenePattern Color Scales | ||
#' The GSEA GenePattern color scales | ||
#' | ||
#' See \code{\link{pal_gsea}} for details. | ||
#' See [pal_gsea()] for details. | ||
#' | ||
#' @inheritParams pal_gsea | ||
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}} | ||
#' @param ... Additional parameters for [ggplot2::discrete_scale()]. | ||
#' | ||
#' @export scale_color_gsea | ||
#' | ||
#' @importFrom ggplot2 scale_color_gradientn | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @rdname scale_gsea | ||
#' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,45 @@ | ||
#' Material Design Color Palettes | ||
#' | ||
#' The Material Design color palettes. | ||
#' | ||
#' @param palette Palette type. | ||
#' There are 19 available options: | ||
#' \itemize{ | ||
#' \item \code{"red"} | ||
#' \item \code{"pink"} | ||
#' \item \code{"purple"} | ||
#' \item \code{"deep-purple"} | ||
#' \item \code{"indigo"} | ||
#' \item \code{"blue"} | ||
#' \item \code{"light-blue"} | ||
#' \item \code{"cyan"} | ||
#' \item \code{"teal"} | ||
#' \item \code{"green"} | ||
#' \item \code{"light-green"} | ||
#' \item \code{"lime"} | ||
#' \item \code{"yellow"} | ||
#' \item \code{"amber"} | ||
#' \item \code{"orange"}, | ||
#' \item \code{"deep-orange"} | ||
#' \item \code{"brown"} | ||
#' \item \code{"grey"} | ||
#' \item \code{"blue-grey"}} | ||
#' See \href{https://m2.material.io/design/color/the-color-system.html}{Material Design color system} | ||
#' for details. | ||
#' Material Design color palettes | ||
#' | ||
#' The Material Design 2 color palettes. | ||
#' | ||
#' @param palette Palette type. There are 19 available options: | ||
#' - `"red"` | ||
#' - `"pink"` | ||
#' - `"purple"` | ||
#' - `"deep-purple"` | ||
#' - `"indigo"` | ||
#' - `"blue"` | ||
#' - `"light-blue"` | ||
#' - `"cyan"` | ||
#' - `"teal"` | ||
#' - `"green"` | ||
#' - `"light-green"` | ||
#' - `"lime"` | ||
#' - `"yellow"` | ||
#' - `"amber"` | ||
#' - `"orange"`, | ||
#' - `"deep-orange"` | ||
#' - `"brown"` | ||
#' - `"grey"` | ||
#' - `"blue-grey"` | ||
#' | ||
#' For details, see [Material Design color | ||
#' system](https://m2.material.io/design/color/the-color-system.html). | ||
#' | ||
#' @param n Number of individual colors to be generated. | ||
#' @param alpha Transparency level, a real number in (0, 1]. | ||
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details. | ||
#' See `alpha` in [grDevices::rgb()] for details. | ||
#' @param reverse Logical. Should the order of the colors be reversed? | ||
#' | ||
#' @export rgb_material | ||
#' | ||
#' @importFrom grDevices colorRamp rgb | ||
#' @importFrom scales manual_pal | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @references | ||
#' \url{https://m2.material.io/design/color/the-color-system.html} | ||
#' <https://m2.material.io/design/color/the-color-system.html> | ||
#' | ||
#' @examples | ||
#' library("scales") | ||
|
@@ -69,18 +68,17 @@ rgb_material <- function( | |
alpha_cols | ||
} | ||
|
||
#' Material Design Color Palettes | ||
#' Material Design color palettes | ||
#' | ||
#' The Material Design color palettes. | ||
#' The Material Design 2 color palettes. | ||
#' | ||
#' @inheritParams rgb_material | ||
#' | ||
#' @export pal_material | ||
#' | ||
#' @importFrom scales manual_pal | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @examples | ||
#' library("scales") | ||
|
@@ -98,19 +96,18 @@ pal_material <- function( | |
manual_pal(unname(alpha_cols)) | ||
} | ||
|
||
#' Material Design Color Palettes | ||
#' Material Design color palettes | ||
#' | ||
#' See \code{\link{pal_material}} for details. | ||
#' See [pal_material()] for details. | ||
#' | ||
#' @inheritParams pal_material | ||
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}} | ||
#' @param ... Additional parameters for [ggplot2::discrete_scale()]. | ||
#' | ||
#' @export scale_color_material | ||
#' | ||
#' @importFrom ggplot2 scale_color_gradientn | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @rdname scale_material | ||
#' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
#' AAAS Journal Color Palettes | ||
#' AAAS journal color palettes | ||
#' | ||
#' Color palettes inspired by plots in journals published by | ||
#' American Association for the Advancement of Science (AAAS), | ||
#' such as \emph{Science} and \emph{Science Translational Medicine}. | ||
#' such as _Science_ and _Science Translational Medicine_. | ||
#' | ||
#' @param palette Palette type. | ||
#' Currently there is one available option: \code{"default"} | ||
#' (10-color palette inspired by \emph{Science}). | ||
#' Currently there is one available option: `"default"` | ||
#' (10-color palette inspired by _Science_). | ||
#' @param alpha Transparency level, a real number in (0, 1]. | ||
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details. | ||
#' See `alpha` in [grDevices::rgb()] for details. | ||
#' | ||
#' @export pal_aaas | ||
#' | ||
#' @importFrom grDevices col2rgb rgb | ||
#' @importFrom scales manual_pal | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @examples | ||
#' library("scales") | ||
|
@@ -38,19 +37,18 @@ pal_aaas <- function(palette = c("default"), alpha = 1) { | |
manual_pal(unname(alpha_cols)) | ||
} | ||
|
||
#' AAAS Journal Color Scales | ||
#' AAAS journal color scales | ||
#' | ||
#' See \code{\link{pal_aaas}} for details. | ||
#' See [pal_aaas()] for details. | ||
#' | ||
#' @inheritParams pal_aaas | ||
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}} | ||
#' @param ... Additional parameters for [ggplot2::discrete_scale()]. | ||
#' | ||
#' @export scale_color_aaas | ||
#' | ||
#' @importFrom ggplot2 discrete_scale | ||
#' | ||
#' @author Nan Xiao <\email{me@@nanx.me}> | | ||
#' <\href{https://nanx.me}{https://nanx.me}> | ||
#' @author Nan Xiao | \email{[email protected]} | <https://nanx.me> | ||
#' | ||
#' @rdname scale_aaas | ||
#' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
#' BMJ Color Palettes | ||
#' BMJ color palettes | ||
#' | ||
#' Color palette from the BMJ living style guide. | ||
#' | ||
#' @param palette Palette type. | ||
#' Currently there is one available option: \code{"default"} | ||
#' (9-color palette). | ||
#' Currently there is one available option: `"default"` | ||
#' (9-color palette). | ||
#' @param alpha Transparency level, a real number in (0, 1]. | ||
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details. | ||
#' See `alpha` in [grDevices::rgb()] for details. | ||
#' | ||
#' @export pal_bmj | ||
#' | ||
#' @importFrom grDevices col2rgb rgb | ||
#' @importFrom scales manual_pal | ||
#' | ||
#' @author Hui Chen <\email{huichen@@zju.edu.cn}> | ||
#' @author Hui Chen | \email{[email protected]} | ||
#' | ||
#' @references | ||
#' <https://technology.bmj.com/living-style-guide/colour.html> | ||
#' | ||
#' @examples | ||
#' library("scales") | ||
|
@@ -35,21 +38,24 @@ pal_bmj <- function(palette = c("default"), alpha = 1) { | |
manual_pal(unname(alpha_cols)) | ||
} | ||
|
||
#' BMJ Color Scales | ||
#' BMJ color scales | ||
#' | ||
#' See \code{\link{pal_bmj}} for details. | ||
#' See [pal_bmj()] for details. | ||
#' | ||
#' @inheritParams pal_bmj | ||
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}} | ||
#' @param ... Additional parameters for [ggplot2::discrete_scale()]. | ||
#' | ||
#' @export scale_color_bmj | ||
#' | ||
#' @importFrom ggplot2 discrete_scale | ||
#' | ||
#' @author Hui Chen <\email{huichen@@zju.edu.cn}> | ||
#' @author Hui Chen | \email{[email protected]} | ||
#' | ||
#' @rdname scale_bmj | ||
#' | ||
#' @references | ||
#' <https://technology.bmj.com/living-style-guide/colour.html> | ||
#' | ||
#' @examples | ||
#' library("ggplot2") | ||
#' data("diamonds") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
#' COSMIC Color Palettes | ||
#' COSMIC color palettes | ||
#' | ||
#' Color palettes inspired by the colors used in projects from the | ||
#' \href{https://cancer.sanger.ac.uk/cosmic}{Catalogue Of | ||
#' Somatic Mutations in Cancers (COSMIC)} | ||
#' [Catalogue Of | ||
#' Somatic Mutations in Cancers (COSMIC)](https://cancer.sanger.ac.uk/cosmic). | ||
#' | ||
#' @param palette Palette type. Currently there are three available options: | ||
#' \code{"signature_substitutions"} (6-color palette), | ||
#' \code{"hallmarks_light"} (10-color palette), and \code{"hallmarks_dark"} | ||
#' (10-color palette). The \code{"hallmarks_light"} option is from | ||
#' \href{https://pubmed.ncbi.nlm.nih.gov/21376230/}{Hanahan and Weinberg (2011)}. | ||
#' - `"signature_substitutions"` (6-color palette). | ||
#' - `"hallmarks_light"` (10-color palette). | ||
#' - `"hallmarks_dark"` (10-color palette). | ||
#' | ||
#' The `"hallmarks_light"` option is from | ||
#' [Hanahan and Weinberg (2011)](https://pubmed.ncbi.nlm.nih.gov/21376230/). | ||
#' @param alpha Transparency level, a real number in (0, 1]. | ||
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details. | ||
#' See `alpha` in [grDevices::rgb()] for details. | ||
#' | ||
#' @export pal_cosmic | ||
#' | ||
#' @importFrom grDevices col2rgb rgb | ||
#' @importFrom scales manual_pal | ||
#' | ||
#' @author Joshua H. Cook <\email{joshuacook0023@@gmail.com}> | | ||
#' <\href{https://github.com/jhrcook}{GitHub/jhrcook}> | ||
#' @author Joshua H. Cook | \email{[email protected]} | | ||
#' [@jhrcook](https://github.com/jhrcook) | ||
#' | ||
#' @examples | ||
#' library("scales") | ||
|
@@ -47,19 +48,19 @@ pal_cosmic <- function( | |
manual_pal(unname(alpha_cols)) | ||
} | ||
|
||
#' COSMIC Color Scales | ||
#' COSMIC color scales | ||
#' | ||
#' See \code{\link{pal_cosmic}} for details. | ||
#' See [pal_cosmic()] for details. | ||
#' | ||
#' @inheritParams pal_cosmic | ||
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}} | ||
#' @param ... Additional parameters for [ggplot2::discrete_scale()]. | ||
#' | ||
#' @export scale_color_cosmic | ||
#' | ||
#' @importFrom ggplot2 discrete_scale | ||
#' | ||
#' @author Joshua H. Cook <\email{joshuacook0023@@gmail.com}> | | ||
#' <\href{https://github.com/jhrcook}{GitHub/jhrcook}> | ||
#' @author Joshua H. Cook | \email{[email protected]} | | ||
#' [@jhrcook](https://github.com/jhrcook) | ||
#' | ||
#' @rdname scale_cosmic | ||
#' | ||
|
Oops, something went wrong.