Skip to content

Commit

Permalink
Fix order of summaries extraction in readModels
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhallquist committed Jun 18, 2024
1 parent 0814457 commit 6fb8273
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/readModels.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ readModels <- function(target=getwd(), recursive=FALSE, filefilter, what="all",

### COMPULSORY SECTIONS NEEDED FOR DOWNSTREAM FUNCTIONS: input, summaries, savedata_info

#SAVEDATA file information -- always extract so that downstream code (e.g., bparameters and h5results) can find info if needed
savedata_info <- tryCatch(l_getSavedata_Fileinfo(curfile, outfiletext, summaries), error=function(e) {
message("Error extracting SAVEDATA file information in output file: ", curfile); print(e)
return(list())
})

### Parse Mplus input into a list by section
inp <- tryCatch(extractInput_1file(rawtext, curfile), error=function(e) {
message("Error parsing input section of output file: ", curfile); print(e)
Expand All @@ -132,7 +126,13 @@ readModels <- function(target=getwd(), recursive=FALSE, filefilter, what="all",
message("Error extracting model summaries in output file: ", curfile); print(e)
return(list())
})


#SAVEDATA file information -- always extract so that downstream code (e.g., bparameters and h5results) can find info if needed
savedata_info <- tryCatch(l_getSavedata_Fileinfo(curfile, outfiletext, summaries), error=function(e) {
message("Error extracting SAVEDATA file information in output file: ", curfile); print(e)
return(list())
})

if (isTRUE("warn_err" %in% what)) {
#Parse warnings and errors in output file
warn_err <- tryCatch(extractWarningsErrors_1file(outfiletext, curfile, input=inp), error=function(e) {
Expand Down

0 comments on commit 6fb8273

Please sign in to comment.