Skip to content

Commit

Permalink
Fix lintr warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-hannah committed Oct 29, 2024
1 parent b358c5a commit be84076
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions R/sg_palette.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#' reversed.
#' @param colour_names Boolean value to indicate whether colour names should be
#' included.
#' @param palette_type Either `sg` to use Scottish Government palettes, `sss`
#' to use Social Security Scotland palettes or `af` to use Analysis Function
#' palettes. Defaults to `sg`.
#' @param palette_type Either "sg" to use Scottish Government palettes
#' (default), "sss" to use Social Security Scotland palettes or "af" to use
#' Analysis Function palettes.
#'
#' @noRd

Expand All @@ -31,7 +31,7 @@ sg_palette <- function(palette = "main",
if (!palette %in% names(palette_list)) {
cli::cli_abort(
c("x" = paste("{.str {palette}} is not a valid palette name ",
"for {.str {palette_type}} palette type."),
"for {.str {palette_type}} palette type."),
"i" = "Available palette{?s}: {.str {names(palette_list)}}."),
call = error_call
)
Expand Down
2 changes: 1 addition & 1 deletion R/use_sgplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use_sgplot <- function(default_colour = sgplot::sg_colour_values["dark-blue"],

# Update default values with those passed to use_sgplot
new_values <- c(...)
for (i in 1:length(new_values)) {
for (i in seq_along(new_values)) {
default <- replace(default,
which(names(default) == names(new_values)[i]),
new_values[i])
Expand Down

0 comments on commit be84076

Please sign in to comment.