Commit 572e2a0e authored by Dorchies David's avatar Dorchies David
Browse files

fix: error in get_result when simulation has crashed

Fix #17
1 merge request!12Resolve "Add a `tidy_result` function"
Pipeline #34273 passed with stage
in 2 minutes and 24 seconds
Showing with 2 additions and 1 deletion
+2 -1
...@@ -49,6 +49,7 @@ get_result <- function(cfg, ...@@ -49,6 +49,7 @@ get_result <- function(cfg,
time_prms <- sapply(attrs, function(attr) { time_prms <- sapply(attrs, function(attr) {
as.numeric(xml_attr(x_res, attr)) as.numeric(xml_attr(x_res, attr))
}) })
tms <- seq(from = time_prms["TpsDebut"], tms <- seq(from = time_prms["TpsDebut"],
to = time_prms["TpsFin"], to = time_prms["TpsFin"],
by = time_prms["TpsPas"] * time_prms["TpsSauv"]) by = time_prms["TpsPas"] * time_prms["TpsSauv"])
...@@ -69,7 +70,7 @@ get_result <- function(cfg, ...@@ -69,7 +70,7 @@ get_result <- function(cfg,
paste(cols, collapse = "|") paste(cols, collapse = "|")
}) })
m <- cbind(tms, m) m <- cbind(tms, m[1:length(tms), ])
colnames(m) <- c("t", column_names) colnames(m) <- c("t", column_names)
class(m) <- c("SicResult", class(m)) class(m) <- c("SicResult", class(m))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment