Allow to select datafile for charts/explore/compare (filtered/non-filtered)

This commit is contained in:
2026-06-14 17:06:43 +02:00
parent 1d1ed3581a
commit e3be326c42
7 changed files with 226 additions and 70 deletions

View File

@ -1,10 +1,12 @@
library(ggplot2)
# Usage: Rscript single_result.r exp_abspath
# Usage: Rscript single_result.r exp_abspath [resultsdata_file]
args <- commandArgs(trailingOnly = TRUE)
experiment <- args[1]
datafile <- paste(experiment, "/resultsdata.csv", sep = "")
resultsdata_file <- if (length(args) >= 2) args[2] else "resultsdata.csv"
suffix <- gsub("^resultsdata|\\.csv$", "", resultsdata_file)
datafile <- file.path(experiment, resultsdata_file)
if (!file.exists(datafile)) {
print(paste("Input file", datafile, "is missing"))
@ -21,6 +23,6 @@ plot <- ggplot(data, aes(x = benchmark, y = faults, fill = resulttype)) +
theme_minimal()
ggsave(
paste(experiment, "/single_result.svg", sep = ""),
paste0(experiment, "/single_result", suffix, ".svg"),
plot = plot,
)