From 7ad8d2da8dd3d57d920838bd66301a054b4107d5 Mon Sep 17 00:00:00 2001 From: tynsci <90842492+tynsci@users.noreply.github.com> Date: Wed, 24 May 2023 11:29:42 +0200 Subject: [PATCH 1/2] Remove path prefix from sim-blq variable name --- R/pmx-reader.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/pmx-reader.R b/R/pmx-reader.R index af390e24..5edd48e5 100755 --- a/R/pmx-reader.R +++ b/R/pmx-reader.R @@ -367,6 +367,7 @@ read_mlx18_res <- function(path, x, ...) { xnames <- names(x[["names"]]) yname <- substring(file_path, regexpr("s/", file_path) + 2) yname <- sub("_obsVsPred.txt", "", yname) + yname <- sub("^.*/", "", yname) names(x[["names"]])[which(xnames == "y_simBlq_mode")] <- paste0(yname,"_simBlq_mode") #handling of mlx18 input, there is no y_simBlq_mean or y_simBlq_mode for Monolix version 2018 From f2a2648dc2f4b21024c30c72011ee39338680e6d Mon Sep 17 00:00:00 2001 From: tynsci <90842492+tynsci@users.noreply.github.com> Date: Wed, 24 May 2023 17:38:03 +0200 Subject: [PATCH 2/2] Use basename instead of sub for platform independence --- R/pmx-reader.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pmx-reader.R b/R/pmx-reader.R index 5edd48e5..1cd19ae6 100755 --- a/R/pmx-reader.R +++ b/R/pmx-reader.R @@ -367,7 +367,7 @@ read_mlx18_res <- function(path, x, ...) { xnames <- names(x[["names"]]) yname <- substring(file_path, regexpr("s/", file_path) + 2) yname <- sub("_obsVsPred.txt", "", yname) - yname <- sub("^.*/", "", yname) + yname <- basename(yname) names(x[["names"]])[which(xnames == "y_simBlq_mode")] <- paste0(yname,"_simBlq_mode") #handling of mlx18 input, there is no y_simBlq_mean or y_simBlq_mode for Monolix version 2018