Skip to content

Commit 0e0b28d

Browse files
authored
Merge pull request #37 from nanxstats/roxygen2md
Convert Rd syntax to Markdown
2 parents 7e30687 + c7bfe46 commit 0e0b28d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+590
-587
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ Suggests:
3131
VignetteBuilder: knitr
3232
Encoding: UTF-8
3333
RoxygenNote: 7.3.1
34+
Roxygen: list(markdown = TRUE)

R/continuous-gsea.R

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
#' The GSEA GenePattern Color Palettes
1+
#' The GSEA GenePattern color palettes
22
#'
33
#' Color palette inspired by the colors used in the
44
#' heatmaps plotted by GSEA GenePattern.
55
#'
66
#' @param palette Palette type.
7-
#' Currently there is one available option: \code{"default"}
8-
#' (continuous palette with 12 base colors).
7+
#' Currently there is one available option: `"default"`
8+
#' (continuous palette with 12 base colors).
99
#' @param n Number of individual colors to be generated.
1010
#' @param alpha Transparency level, a real number in (0, 1].
11-
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details.
11+
#' See `alpha` in [grDevices::rgb()] for details.
1212
#' @param reverse Logical. Should the order of the colors be reversed?
1313
#'
1414
#' @export rgb_gsea
1515
#'
1616
#' @importFrom grDevices colorRamp rgb
1717
#' @importFrom scales manual_pal
1818
#'
19-
#' @author Nan Xiao <\email{me@@nanx.me}> |
20-
#' <\href{https://nanx.me}{https://nanx.me}>
19+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
2120
#'
2221
#' @note The 12 base colors used in this palette are derived from the
23-
#' \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}.
22+
#' [HeatMapImage documentation](https://modulerepository.genepattern.org/gpModuleRepository/download/prod/module/?file=/HeatMapImage/broad.mit.edu:cancer.software.genepattern.module.analysis/00032/6/HeatMapImage.pdf).
2423
#'
2524
#' @examples
2625
#' library("scales")
@@ -44,7 +43,7 @@ rgb_gsea <- function(palette = c("default"), n = 12, alpha = 1, reverse = FALSE)
4443
alpha_cols
4544
}
4645

47-
#' The GSEA GenePattern Color Palettes
46+
#' The GSEA GenePattern color palettes
4847
#'
4948
#' Color palette inspired by the colors used in the
5049
#' heatmaps plotted by GSEA GenePattern.
@@ -55,8 +54,7 @@ rgb_gsea <- function(palette = c("default"), n = 12, alpha = 1, reverse = FALSE)
5554
#'
5655
#' @importFrom scales manual_pal
5756
#'
58-
#' @author Nan Xiao <\email{me@@nanx.me}> |
59-
#' <\href{https://nanx.me}{https://nanx.me}>
57+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
6058
#'
6159
#' @examples
6260
#' library("scales")
@@ -68,19 +66,18 @@ pal_gsea <- function(palette = c("default"), n = 12, alpha = 1, reverse = FALSE)
6866
manual_pal(unname(alpha_cols))
6967
}
7068

71-
#' The GSEA GenePattern Color Scales
69+
#' The GSEA GenePattern color scales
7270
#'
73-
#' See \code{\link{pal_gsea}} for details.
71+
#' See [pal_gsea()] for details.
7472
#'
7573
#' @inheritParams pal_gsea
76-
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}}
74+
#' @param ... Additional parameters for [ggplot2::discrete_scale()].
7775
#'
7876
#' @export scale_color_gsea
7977
#'
8078
#' @importFrom ggplot2 scale_color_gradientn
8179
#'
82-
#' @author Nan Xiao <\email{me@@nanx.me}> |
83-
#' <\href{https://nanx.me}{https://nanx.me}>
80+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
8481
#'
8582
#' @rdname scale_gsea
8683
#'

R/continuous-material.R

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
1-
#' Material Design Color Palettes
2-
#'
3-
#' The Material Design color palettes.
4-
#'
5-
#' @param palette Palette type.
6-
#' There are 19 available options:
7-
#' \itemize{
8-
#' \item \code{"red"}
9-
#' \item \code{"pink"}
10-
#' \item \code{"purple"}
11-
#' \item \code{"deep-purple"}
12-
#' \item \code{"indigo"}
13-
#' \item \code{"blue"}
14-
#' \item \code{"light-blue"}
15-
#' \item \code{"cyan"}
16-
#' \item \code{"teal"}
17-
#' \item \code{"green"}
18-
#' \item \code{"light-green"}
19-
#' \item \code{"lime"}
20-
#' \item \code{"yellow"}
21-
#' \item \code{"amber"}
22-
#' \item \code{"orange"},
23-
#' \item \code{"deep-orange"}
24-
#' \item \code{"brown"}
25-
#' \item \code{"grey"}
26-
#' \item \code{"blue-grey"}}
27-
#' See \href{https://m2.material.io/design/color/the-color-system.html}{Material Design color system}
28-
#' for details.
1+
#' Material Design color palettes
2+
#'
3+
#' The Material Design 2 color palettes.
4+
#'
5+
#' @param palette Palette type. There are 19 available options:
6+
#' - `"red"`
7+
#' - `"pink"`
8+
#' - `"purple"`
9+
#' - `"deep-purple"`
10+
#' - `"indigo"`
11+
#' - `"blue"`
12+
#' - `"light-blue"`
13+
#' - `"cyan"`
14+
#' - `"teal"`
15+
#' - `"green"`
16+
#' - `"light-green"`
17+
#' - `"lime"`
18+
#' - `"yellow"`
19+
#' - `"amber"`
20+
#' - `"orange"`,
21+
#' - `"deep-orange"`
22+
#' - `"brown"`
23+
#' - `"grey"`
24+
#' - `"blue-grey"`
25+
#'
26+
#' For details, see [Material Design color
27+
#' system](https://m2.material.io/design/color/the-color-system.html).
28+
#'
2929
#' @param n Number of individual colors to be generated.
3030
#' @param alpha Transparency level, a real number in (0, 1].
31-
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details.
31+
#' See `alpha` in [grDevices::rgb()] for details.
3232
#' @param reverse Logical. Should the order of the colors be reversed?
3333
#'
3434
#' @export rgb_material
3535
#'
3636
#' @importFrom grDevices colorRamp rgb
3737
#' @importFrom scales manual_pal
3838
#'
39-
#' @author Nan Xiao <\email{me@@nanx.me}> |
40-
#' <\href{https://nanx.me}{https://nanx.me}>
39+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
4140
#'
4241
#' @references
43-
#' \url{https://m2.material.io/design/color/the-color-system.html}
42+
#' <https://m2.material.io/design/color/the-color-system.html>
4443
#'
4544
#' @examples
4645
#' library("scales")
@@ -69,18 +68,17 @@ rgb_material <- function(
6968
alpha_cols
7069
}
7170

72-
#' Material Design Color Palettes
71+
#' Material Design color palettes
7372
#'
74-
#' The Material Design color palettes.
73+
#' The Material Design 2 color palettes.
7574
#'
7675
#' @inheritParams rgb_material
7776
#'
7877
#' @export pal_material
7978
#'
8079
#' @importFrom scales manual_pal
8180
#'
82-
#' @author Nan Xiao <\email{me@@nanx.me}> |
83-
#' <\href{https://nanx.me}{https://nanx.me}>
81+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
8482
#'
8583
#' @examples
8684
#' library("scales")
@@ -98,19 +96,18 @@ pal_material <- function(
9896
manual_pal(unname(alpha_cols))
9997
}
10098

101-
#' Material Design Color Palettes
99+
#' Material Design color palettes
102100
#'
103-
#' See \code{\link{pal_material}} for details.
101+
#' See [pal_material()] for details.
104102
#'
105103
#' @inheritParams pal_material
106-
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}}
104+
#' @param ... Additional parameters for [ggplot2::discrete_scale()].
107105
#'
108106
#' @export scale_color_material
109107
#'
110108
#' @importFrom ggplot2 scale_color_gradientn
111109
#'
112-
#' @author Nan Xiao <\email{me@@nanx.me}> |
113-
#' <\href{https://nanx.me}{https://nanx.me}>
110+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
114111
#'
115112
#' @rdname scale_material
116113
#'

R/discrete-aaas.R

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
#' AAAS Journal Color Palettes
1+
#' AAAS journal color palettes
22
#'
33
#' Color palettes inspired by plots in journals published by
44
#' American Association for the Advancement of Science (AAAS),
5-
#' such as \emph{Science} and \emph{Science Translational Medicine}.
5+
#' such as _Science_ and _Science Translational Medicine_.
66
#'
77
#' @param palette Palette type.
8-
#' Currently there is one available option: \code{"default"}
9-
#' (10-color palette inspired by \emph{Science}).
8+
#' Currently there is one available option: `"default"`
9+
#' (10-color palette inspired by _Science_).
1010
#' @param alpha Transparency level, a real number in (0, 1].
11-
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details.
11+
#' See `alpha` in [grDevices::rgb()] for details.
1212
#'
1313
#' @export pal_aaas
1414
#'
1515
#' @importFrom grDevices col2rgb rgb
1616
#' @importFrom scales manual_pal
1717
#'
18-
#' @author Nan Xiao <\email{me@@nanx.me}> |
19-
#' <\href{https://nanx.me}{https://nanx.me}>
18+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
2019
#'
2120
#' @examples
2221
#' library("scales")
@@ -38,19 +37,18 @@ pal_aaas <- function(palette = c("default"), alpha = 1) {
3837
manual_pal(unname(alpha_cols))
3938
}
4039

41-
#' AAAS Journal Color Scales
40+
#' AAAS journal color scales
4241
#'
43-
#' See \code{\link{pal_aaas}} for details.
42+
#' See [pal_aaas()] for details.
4443
#'
4544
#' @inheritParams pal_aaas
46-
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}}
45+
#' @param ... Additional parameters for [ggplot2::discrete_scale()].
4746
#'
4847
#' @export scale_color_aaas
4948
#'
5049
#' @importFrom ggplot2 discrete_scale
5150
#'
52-
#' @author Nan Xiao <\email{me@@nanx.me}> |
53-
#' <\href{https://nanx.me}{https://nanx.me}>
51+
#' @author Nan Xiao | \email{me@nanx.me} | <https://nanx.me>
5452
#'
5553
#' @rdname scale_aaas
5654
#'

R/discrete-bmj.R

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
#' BMJ Color Palettes
1+
#' BMJ color palettes
22
#'
33
#' Color palette from the BMJ living style guide.
44
#'
55
#' @param palette Palette type.
6-
#' Currently there is one available option: \code{"default"}
7-
#' (9-color palette).
6+
#' Currently there is one available option: `"default"`
7+
#' (9-color palette).
88
#' @param alpha Transparency level, a real number in (0, 1].
9-
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details.
9+
#' See `alpha` in [grDevices::rgb()] for details.
1010
#'
1111
#' @export pal_bmj
1212
#'
1313
#' @importFrom grDevices col2rgb rgb
1414
#' @importFrom scales manual_pal
1515
#'
16-
#' @author Hui Chen <\email{huichen@@zju.edu.cn}>
16+
#' @author Hui Chen | \email{huichen@zju.edu.cn}
17+
#'
18+
#' @references
19+
#' <https://technology.bmj.com/living-style-guide/colour.html>
1720
#'
1821
#' @examples
1922
#' library("scales")
@@ -35,21 +38,24 @@ pal_bmj <- function(palette = c("default"), alpha = 1) {
3538
manual_pal(unname(alpha_cols))
3639
}
3740

38-
#' BMJ Color Scales
41+
#' BMJ color scales
3942
#'
40-
#' See \code{\link{pal_bmj}} for details.
43+
#' See [pal_bmj()] for details.
4144
#'
4245
#' @inheritParams pal_bmj
43-
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}}
46+
#' @param ... Additional parameters for [ggplot2::discrete_scale()].
4447
#'
4548
#' @export scale_color_bmj
4649
#'
4750
#' @importFrom ggplot2 discrete_scale
4851
#'
49-
#' @author Hui Chen <\email{huichen@@zju.edu.cn}>
52+
#' @author Hui Chen | \email{huichen@zju.edu.cn}
5053
#'
5154
#' @rdname scale_bmj
5255
#'
56+
#' @references
57+
#' <https://technology.bmj.com/living-style-guide/colour.html>
58+
#'
5359
#' @examples
5460
#' library("ggplot2")
5561
#' data("diamonds")

R/discrete-cosmic.R

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
#' COSMIC Color Palettes
1+
#' COSMIC color palettes
22
#'
33
#' Color palettes inspired by the colors used in projects from the
4-
#' \href{https://cancer.sanger.ac.uk/cosmic}{Catalogue Of
5-
#' Somatic Mutations in Cancers (COSMIC)}
4+
#' [Catalogue Of
5+
#' Somatic Mutations in Cancers (COSMIC)](https://cancer.sanger.ac.uk/cosmic).
66
#'
77
#' @param palette Palette type. Currently there are three available options:
8-
#' \code{"signature_substitutions"} (6-color palette),
9-
#' \code{"hallmarks_light"} (10-color palette), and \code{"hallmarks_dark"}
10-
#' (10-color palette). The \code{"hallmarks_light"} option is from
11-
#' \href{https://pubmed.ncbi.nlm.nih.gov/21376230/}{Hanahan and Weinberg (2011)}.
8+
#' - `"signature_substitutions"` (6-color palette).
9+
#' - `"hallmarks_light"` (10-color palette).
10+
#' - `"hallmarks_dark"` (10-color palette).
1211
#'
12+
#' The `"hallmarks_light"` option is from
13+
#' [Hanahan and Weinberg (2011)](https://pubmed.ncbi.nlm.nih.gov/21376230/).
1314
#' @param alpha Transparency level, a real number in (0, 1].
14-
#' See \code{alpha} in \code{\link[grDevices]{rgb}} for details.
15+
#' See `alpha` in [grDevices::rgb()] for details.
1516
#'
1617
#' @export pal_cosmic
1718
#'
1819
#' @importFrom grDevices col2rgb rgb
1920
#' @importFrom scales manual_pal
2021
#'
21-
#' @author Joshua H. Cook <\email{joshuacook0023@@gmail.com}> |
22-
#' <\href{https://github.com/jhrcook}{GitHub/jhrcook}>
22+
#' @author Joshua H. Cook | \email{joshuacook0023@gmail.com} |
23+
#' [@jhrcook](https://github.com/jhrcook)
2324
#'
2425
#' @examples
2526
#' library("scales")
@@ -47,19 +48,19 @@ pal_cosmic <- function(
4748
manual_pal(unname(alpha_cols))
4849
}
4950

50-
#' COSMIC Color Scales
51+
#' COSMIC color scales
5152
#'
52-
#' See \code{\link{pal_cosmic}} for details.
53+
#' See [pal_cosmic()] for details.
5354
#'
5455
#' @inheritParams pal_cosmic
55-
#' @param ... additional parameters for \code{\link[ggplot2]{discrete_scale}}
56+
#' @param ... Additional parameters for [ggplot2::discrete_scale()].
5657
#'
5758
#' @export scale_color_cosmic
5859
#'
5960
#' @importFrom ggplot2 discrete_scale
6061
#'
61-
#' @author Joshua H. Cook <\email{joshuacook0023@@gmail.com}> |
62-
#' <\href{https://github.com/jhrcook}{GitHub/jhrcook}>
62+
#' @author Joshua H. Cook | \email{joshuacook0023@gmail.com} |
63+
#' [@jhrcook](https://github.com/jhrcook)
6364
#'
6465
#' @rdname scale_cosmic
6566
#'

0 commit comments

Comments
 (0)