Allow to select datafile for charts/explore/compare (filtered/non-filtered)
This commit is contained in:
@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user