Added documebtation

This commit is contained in:
gnoblet 2023-05-28 15:35:35 +02:00
parent 97b74dc343
commit 079b3f8fe4

View file

@ -1,3 +1,14 @@
#' @title Return function to interpolate a fallback palette base on viridis::magma()
#'
#' @param reverse Boolean indicating whether the palette should be reversed
#' @param color_ramp_palette Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the latter with `FALSE`
#' @param discrete Boolean. Discrete or not? Default to FALSE.
#' @param n Number of colors in the palette. Default to 5. Passe to `viridis::magma()`
#' @param ... Other parameters to pass to `grDevices::colorRampPalette()`
#'
#' @return A color palette
#'
#' @export
pal_fallback <- function(reverse = FALSE, pal_fallback <- function(reverse = FALSE,
color_ramp_palette = FALSE, color_ramp_palette = FALSE,
discrete = FALSE, discrete = FALSE,