-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain_evaluate.R
More file actions
36 lines (27 loc) · 944 Bytes
/
Copy pathmain_evaluate.R
File metadata and controls
36 lines (27 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Entry point for evaluating simulated processes and generating plots
# Validate arguments
args <- commandArgs(trailingOnly = TRUE)
# Parse arguments
output_dir <- args[1]
if (is.null(output_dir)) {
stop("Usage: Rscript main_evaluate.R <output_dir>")
}
if (!dir.exists(output_dir)) {
message("Output directory does not exist. Creating: ", output_dir)
dir.create(output_dir, recursive = TRUE)
}
# Install required packages and set up
#-----------------------------------------
packages <- readLines("requirements.txt")
# install required packages if they are not installed
for (p in packages) {
if (!requireNamespace(p, quietly = TRUE)) {
install.packages(p,repos = "http://cran.us.r-project.org")
}
}
source("setup.R")
# Run evaluation
#-----------------------------------------
# Pass output_dir into the evaluation script
source("analyses/evaluate_methods_performance.R", local = TRUE)
message("Evaluation complete.")