From c35b8edec8721e73df3fbfeb6f2a02e039ae2f7b Mon Sep 17 00:00:00 2001 From: merlinoa Date: Thu, 15 Apr 2021 08:44:40 -0400 Subject: [PATCH 1/2] `markerColourIconCheck()` fixes error being thrown when allowed colours used --- R/google_map_layer_parameters.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/google_map_layer_parameters.R b/R/google_map_layer_parameters.R index b53520dd..da254fdf 100644 --- a/R/google_map_layer_parameters.R +++ b/R/google_map_layer_parameters.R @@ -121,7 +121,8 @@ layerId <- function(layer_id){ # to be 'icon' # @param data the data supplied to the map layer # @param objArgs the arguments to the function -# @param colour the colour argument for a marker +# @param colour Set to `NULL` to not check the clour. Set to anything other than `NULL` +# to check the colour. # @param marker_icon the icon argument for a marker markerColourIconCheck <- function(data, objArgs, colour, marker_icon){ @@ -134,7 +135,7 @@ markerColourIconCheck <- function(data, objArgs, colour, marker_icon){ } if(!is.null(colour)){ - if(!all((tolower(data[, colour])) %in% c("red","blue","green","lavender"))){ + if(!all((tolower(data[["colour"]])) %in% c("red","blue","green","lavender"))){ stop("colours must be either red, blue, green or lavender") } } From de26ebad327a7282ae90642bc122304f31ac9d17 Mon Sep 17 00:00:00 2001 From: merlinoa Date: Thu, 15 Apr 2021 19:55:22 -0400 Subject: [PATCH 2/2] typo --- R/google_map_layer_parameters.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/google_map_layer_parameters.R b/R/google_map_layer_parameters.R index da254fdf..9b3685a8 100644 --- a/R/google_map_layer_parameters.R +++ b/R/google_map_layer_parameters.R @@ -121,7 +121,7 @@ layerId <- function(layer_id){ # to be 'icon' # @param data the data supplied to the map layer # @param objArgs the arguments to the function -# @param colour Set to `NULL` to not check the clour. Set to anything other than `NULL` +# @param colour Set to `NULL` to not check the colour. Set to anything other than `NULL` # to check the colour. # @param marker_icon the icon argument for a marker markerColourIconCheck <- function(data, objArgs, colour, marker_icon){