From 079b3f8fe4528dd02a0067d8e79880241976e6c8 Mon Sep 17 00:00:00 2001 From: gnoblet Date: Sun, 28 May 2023 15:35:35 +0200 Subject: [PATCH] Added documebtation --- R/pal_fallback.R | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/R/pal_fallback.R b/R/pal_fallback.R index add80f5..0fb7b23 100644 --- a/R/pal_fallback.R +++ b/R/pal_fallback.R @@ -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, color_ramp_palette = FALSE, discrete = FALSE,