Просмотр исходного кода

Add missing Rd tags, namely value/@eturn

tags/v0.3.0
Garrick Aden-Buie 6 лет назад
Родитель
Сommit
7a5472a9ae
22 измененных файлов: 92 добавлений и 1 удалений
  1. +6
    -0
      R/color.R
  2. +1
    -0
      R/ggplot2.R
  3. +2
    -0
      R/utils.R
  4. +2
    -0
      R/xaringanthemer-deprecated.R
  5. +5
    -1
      man-roxygen/style-usage.R
  6. +3
    -0
      man/apply_alpha.Rd
  7. +4
    -0
      man/choose_dark_or_light.Rd
  8. +3
    -0
      man/google_font.Rd
  9. +3
    -0
      man/google_language_codes.Rd
  10. +4
    -0
      man/lighten_darken_color.Rd
  11. +5
    -0
      man/style_duo.Rd
  12. +5
    -0
      man/style_duo_accent.Rd
  13. +5
    -0
      man/style_duo_accent_inverse.Rd
  14. +5
    -0
      man/style_mono_accent.Rd
  15. +5
    -0
      man/style_mono_accent_inverse.Rd
  16. +5
    -0
      man/style_mono_dark.Rd
  17. +5
    -0
      man/style_mono_light.Rd
  18. +5
    -0
      man/style_solarized_dark.Rd
  19. +5
    -0
      man/style_solarized_light.Rd
  20. +5
    -0
      man/style_xaringan.Rd
  21. +3
    -0
      man/theme_xaringan_get_value.Rd
  22. +6
    -0
      man/xaringanthemer-deprecated.Rd

+ 6
- 0
R/color.R Просмотреть файл

@@ -13,6 +13,8 @@
#' scales::show_col(c(blue_light, blue, blue_dark))
#' }
#'
#' @return A character string with the lightened or darkened color in
#' hexadecimal format.
#' @name lighten_darken_color
NULL

@@ -48,6 +50,7 @@ darken_color <- function(color_hex, strength = 0.8) {
#' scales::show_col(c(blue, blue_transparent))
#' }
#'
#' @return A character string with added opacity level as hexadecimal characters.
#' @export
apply_alpha <- function(color_hex, opacity = 0.5) {
paste0(color_hex, as.hexmode(round(255 * opacity, 0)))
@@ -81,6 +84,9 @@ adjust_value_color <- function(color_hex, strength = 0.5) {
#' scales::show_col(c(light_green, contrast_green, dark_purple, contrast_purple))
#' }
#'
#' @return The `black` color or `white` color according to which color provides
#' the greates contrast with the input color.
#'
#' @export
choose_dark_or_light <- function(x, black = "#000000", white = "#FFFFFF") {
if (is_light_color(x)) eval(black) else eval(white)

+ 1
- 0
R/ggplot2.R Просмотреть файл

@@ -1005,6 +1005,7 @@ requires_xaringanthemer_env <- function(
#' theme_xaringan_get_value("header_color")
#' theme_xaringan_get_value("text_bold_color")
#'
#' @return The value of the xaringanthemer style parameter.
#' @export
theme_xaringan_get_value <- function(setting, css_file = NULL) {
requires_xaringanthemer_env(css_file = css_file)

+ 2
- 0
R/utils.R Просмотреть файл

@@ -41,6 +41,7 @@ call_style_xaringan <- function() {
#' @param ... Font weights to include, example "400", "400i"
#' @param languages Font languages to include (dependent on the font.) See
#' [google_language_codes()].
#' @return A `"google_font"` object.
#' @export
google_font <- function(family, ..., languages = NULL) {
base <- "https://fonts.googleapis.com/css?family="
@@ -70,6 +71,7 @@ is_google_font <- function(x) inherits(x, "google_font")
#' validates that the language codes given are valid.
#' @seealso [google_font()]
#' @param language_codes Vector of potential Google language codes
#' @return A vector of Google Font language codes matching `language_codes`.
#' @export
google_language_codes <- function(
language_codes = c(

+ 2
- 0
R/xaringanthemer-deprecated.R Просмотреть файл

@@ -2,6 +2,8 @@
#'
#' These functions in xaringanthemer have been deprecated or renamed.
#'
#' @param ... Argumets passed to the new or renamed functions.
#' @return The result of the new or renamed function.
#' @name xaringanthemer-deprecated
NULL


+ 5
- 1
man-roxygen/style-usage.R Просмотреть файл

@@ -8,4 +8,8 @@
#' xaringan::moon_reader:
#' css: xaringan-themer.css
#' ````
#
#'
#' @return The CSS styles are written to the file path provided in `outfile`
#' (by default to `xaringan-themer.css`). If `outfile` is `NULL`, the CSS is
#' returned directly as a character string.
#'

+ 3
- 0
man/apply_alpha.Rd Просмотреть файл

@@ -11,6 +11,9 @@ apply_alpha(color_hex, opacity = 0.5)

\item{opacity}{Desired opacity of the output color}
}
\value{
A character string with added opacity level as hexadecimal characters.
}
\description{
Applies alpha (or opacity) to a color in hexadecimal form by
converting opacity in the \verb{[0, 1]} range to hex in the \verb{[0, 255]} range

+ 4
- 0
man/choose_dark_or_light.Rd Просмотреть файл

@@ -15,6 +15,10 @@ choose_dark_or_light(x, black = "#000000", white = "#FFFFFF")
\item{white}{Text or foreground color or expression, e.g. "#EEE" or
\code{substitute(lighten_color(x, 0.8))}, if white text provides the best contrast.}
}
\value{
The \code{black} color or \code{white} color according to which color provides
the greates contrast with the input color.
}
\description{
Takes a color input as \code{x} and returns either the black or white color (or
expression) if dark or light text should be used over the input color for

+ 3
- 0
man/google_font.Rd Просмотреть файл

@@ -14,6 +14,9 @@ google_font(family, ..., languages = NULL)
\item{languages}{Font languages to include (dependent on the font.) See
\code{\link[=google_language_codes]{google_language_codes()}}.}
}
\value{
A \code{"google_font"} object.
}
\description{
Builds Google Fonts URL from family name. Extra weights are given in the
\code{...} parameters. Languages can be specified in \code{langauges} and must one or

+ 3
- 0
man/google_language_codes.Rd Просмотреть файл

@@ -14,6 +14,9 @@ google_language_codes(
\arguments{
\item{language_codes}{Vector of potential Google language codes}
}
\value{
A vector of Google Font language codes matching \code{language_codes}.
}
\description{
Gives a list of valid Language Codes for Google Fonts, or
validates that the language codes given are valid.

+ 4
- 0
man/lighten_darken_color.Rd Просмотреть файл

@@ -17,6 +17,10 @@ darken_color(color_hex, strength = 0.8)
where 0 is entirely the original color and 1 is entirely white
(\code{lighten_color()}) or black (\code{darken_color()}).}
}
\value{
A character string with the lightened or darkened color in
hexadecimal format.
}
\description{
Produces a linear blend of the color with white or black.
}

+ 5
- 0
man/style_duo.Rd Просмотреть файл

@@ -409,6 +409,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
A duotone theme designed to work well with two complementary
colors.

+ 5
- 0
man/style_duo_accent.Rd Просмотреть файл

@@ -426,6 +426,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
An default xaringan theme with a two colors used for color
accents on select elements (headers, bold text, etc.).

+ 5
- 0
man/style_duo_accent_inverse.Rd Просмотреть файл

@@ -428,6 +428,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
An "inverted" default xaringan theme with a two colors used
for color accents on select elements (headers, bold text, etc.).

+ 5
- 0
man/style_mono_accent.Rd Просмотреть файл

@@ -413,6 +413,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
The default xaringan theme with a single color used for color
accents on select elements (headers, bold text, etc.).

+ 5
- 0
man/style_mono_accent_inverse.Rd Просмотреть файл

@@ -414,6 +414,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
An "inverted" default xaringan theme with a single color used
for color accents on select elements (headers, bold text, etc.).

+ 5
- 0
man/style_mono_dark.Rd Просмотреть файл

@@ -415,6 +415,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
A dark monotone theme based around a single color.
}

+ 5
- 0
man/style_mono_light.Rd Просмотреть файл

@@ -415,6 +415,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
A light monotone theme based around a single color.
}

+ 5
- 0
man/style_solarized_dark.Rd Просмотреть файл

@@ -394,6 +394,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
A dark theme based around on the solarized color scheme.
Works well with "\code{highlightStyle: solarized-dark}" or

+ 5
- 0
man/style_solarized_light.Rd Просмотреть файл

@@ -394,6 +394,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
A light theme based around on the solarized color scheme.
Works well with "\code{highlightStyle: solarized-dark}" or

+ 5
- 0
man/style_xaringan.Rd Просмотреть файл

@@ -400,6 +400,11 @@ class with the \code{font-family} property. See the \strong{Fonts} section of

\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
}
\value{
The CSS styles are written to the file path provided in \code{outfile}
(by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is
returned directly as a character string.
}
\description{
Creates a customized Xaringan theme CSS file.
}

+ 3
- 0
man/theme_xaringan_get_value.Rd Просмотреть файл

@@ -16,6 +16,9 @@ lets you create a \pkg{ggplot2} theme for your \pkg{xaringan} slides, even
if you have only saved your theme CSS file and you aren't creating your
CSS theme with \pkg{xaringanthemer} in your slides' source file.}
}
\value{
The value of the xaringanthemer style parameter.
}
\description{
A helper function to retrieve the value of style settings as set by a
xaringanthemer style function, for use in plotting and other circumstances.

+ 6
- 0
man/xaringanthemer-deprecated.Rd Просмотреть файл

@@ -37,6 +37,12 @@ solarized_light(...)

solarized_dark(...)
}
\arguments{
\item{...}{Argumets passed to the new or renamed functions.}
}
\value{
The result of the new or renamed function.
}
\description{
These functions in xaringanthemer have been deprecated or renamed.


Загрузка…
Отмена
Сохранить