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

@ -6,7 +6,9 @@ library(ggplot2)
args <- commandArgs(trailingOnly = TRUE)
experiment <- args[1]
datafile <- paste(experiment, "/faults.csv", sep = "")
faults_file <- if (length(args) >= 2) args[2] else "faults.csv"
suffix <- gsub("^faults|\\.csv$", "", faults_file)
datafile <- file.path(experiment, faults_file)
if (!file.exists(datafile)) {
print(paste("Input file", datafile, "is missing"))
@ -27,6 +29,6 @@ plot <- ggplot(data, aes(x = fault_address, y = faults)) +
theme_minimal()
ggsave(
paste(experiment, "/scatter.svg", sep = ""),
paste0(experiment, "/scatter", suffix, ".svg"),
plot = plot,
)