From fdde5f89d2c472daa032b89d14c4d32bd03aacb3 Mon Sep 17 00:00:00 2001 From: orichters Date: Wed, 6 Sep 2023 14:13:44 +0200 Subject: [PATCH] don't fail on empty config file rows --- scripts/start/readCheckScenarioConfig.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/start/readCheckScenarioConfig.R b/scripts/start/readCheckScenarioConfig.R index e692f8f67..cd238694e 100644 --- a/scripts/start/readCheckScenarioConfig.R +++ b/scripts/start/readCheckScenarioConfig.R @@ -21,7 +21,10 @@ readCheckScenarioConfig <- function(filename, remindPath = ".", testmode = FALSE } else { cfg <- gms::readDefaultConfig(remindPath) } - scenConf <- read.csv2(filename, stringsAsFactors = FALSE, row.names = 1, na.strings = "", comment.char = "#") + scenConf <- read.csv2(filename, stringsAsFactors = FALSE, na.strings = "", comment.char = "#") + scenConf <- scenConf[! is.na(scenConf[1]), ] + rownames(scenConf) <- scenConf[, 1] + scenConf[1] <- NULL toolong <- nchar(rownames(scenConf)) > 75 if (any(toolong)) { warning("These titles are too long: ",