From 2975dc8fc03734efb5eb1eb7e8771a23ddb647d5 Mon Sep 17 00:00:00 2001 From: Brett Moore Date: Wed, 18 Sep 2024 13:16:00 -0600 Subject: [PATCH] Proper FuelType Check --- R/fire_behaviour_prediction.r | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/fire_behaviour_prediction.r b/R/fire_behaviour_prediction.r index c8f131d..4f993f5 100644 --- a/R/fire_behaviour_prediction.r +++ b/R/fire_behaviour_prediction.r @@ -43,7 +43,7 @@ fire_behaviour_prediction <- function( # set local scope variables from the parameters for simpler to referencing names(input) <- toupper(names(input)) ID <- input$ID - FUELTYPE <- if(is.null(input$FUELTYPE))stop("FuelType does not exist in input, it is necessary for FBP calculation") else (toupper(input$FUELTYPE)) + FUELTYPE <- input$FUELTYPE FFMC <- input$FFMC BUI <- input$BUI WS <- input$WS @@ -84,6 +84,7 @@ fire_behaviour_prediction <- function( ) FUELTYPE <- rep("C2", n0) } + FUELTYPE <- toupper(FUELTYPE) if (!exists("FFMC") | is.null(FFMC)) { warning( paste0(