From aa819f7e3a18a17d69e17be084e101a2ce14c5d7 Mon Sep 17 00:00:00 2001 From: "Lukas D. Sauer" Date: Tue, 13 Sep 2022 11:00:59 +0200 Subject: [PATCH] Non-integer requirement name in coverage matrix Fixing the requirement title in the coverage matrix for requirement names that are non-integers, such as "01" instead of "1". This is a quick fix. It would be even better if the actual requirement was used, as in the risk assessment matrix. --- R/coverage-matrix.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/coverage-matrix.R b/R/coverage-matrix.R index 80af6ea..fba0c9e 100644 --- a/R/coverage-matrix.R +++ b/R/coverage-matrix.R @@ -50,8 +50,8 @@ vt_scrape_coverage_matrix <- function(type = c("long", "wide"), # req_title uses only first numeric position out$req_title <- factor(out$req_title, levels = paste0("Requirement ", - sort(as.numeric(unique(unlist(lapply(strsplit(out$req_title, split = " "), - function(x){x[2]}))))))) + sort(unique(unlist(lapply(strsplit(out$req_title, split = " "), + function(x){x[2]})))))) out[order(out$req_title),] }