From 447e4ed3788412b3e2dae404a2b8a377fe8096b9 Mon Sep 17 00:00:00 2001 From: MANSOURI Assil Ext Date: Fri, 10 Feb 2023 15:29:08 +0100 Subject: [PATCH] fix createCluster --- NEWS.md | 1 + R/createCluster.R | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index c43f04a5..0ed7c7ed 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ BUGFIXES : * Fix case sensitivity for `editCluster()` in API mode * Fix opts returned (proper new study_id) when using `createVariant()` +* Fix case sensitivity for groups in `createCluster()` and `createClusterRES()` diff --git a/R/createCluster.R b/R/createCluster.R index 900a2015..9df1123d 100644 --- a/R/createCluster.R +++ b/R/createCluster.R @@ -160,7 +160,7 @@ createCluster <- function(area, "Other 2", "Other 3", "Other 4") - if (!is.null(group) && !group %in% thermal_group) + if (!is.null(group) && !group %in% tolower(thermal_group)) warning( "Group: '", group, "' is not a valid name recognized by Antares,", " you should be using one of: ", paste(thermal_group, collapse = ", ") @@ -202,7 +202,7 @@ createClusterRES <- function(area, "Other RES 2", "Other RES 3", "Other RES 4") - if (!is.null(group) && !group %in% renewables_group) + if (!is.null(group) && !group %in% tolower(renewables_group)) warning( "Group: '", group, "' is not a valid name recognized by Antares,", " you should be using one of: ", paste(renewables_group, collapse = ", ")