From cf4aa465210a76bac2ec628bcc82152597be6ae5 Mon Sep 17 00:00:00 2001 From: David <david.dorchies@inrae.fr> Date: Sun, 1 Dec 2024 20:06:01 +0100 Subject: [PATCH] feat(CreateController): allow NULL location for Y an U Refs #174 --- R/CreateController.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/CreateController.R b/R/CreateController.R index 060c139..fb95c4d 100644 --- a/R/CreateController.R +++ b/R/CreateController.R @@ -70,6 +70,7 @@ CreateController <- function(supervisor, ctrl.id, Y, U, FUN){ #' # For pointing the discharge at the oulet of basins "54095" and "54002" #' CreateControl(c("54095", "54002")) CreateControl <- function(locations, sv, isU) { + if (is.null(locations)) return(NULL) if (!is.character(locations)) { stop("Parameters `Y` and `U` should be character") } -- GitLab