Skip to content

Commit

Permalink
debugging test
Browse files Browse the repository at this point in the history
  • Loading branch information
philipdelff committed Jan 16, 2025
1 parent 09e9f66 commit f07cb4c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
18 changes: 13 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# NMdata 0.1.9

## New features
* `NMreadInits()` adds ability to read the parameter structure as
specified in a control stream, including initial values, lower/upper
bounds and FIX information. It automatically allocates these values
to parameter indexes, like `THETA(I)` and `OMEGA(I,J)`.
* `NMreadInits()` is a new function adding the ability to read the
parameter structure as specified in a control stream, including
initial values, lower/upper bounds and FIX information. It
automatically allocates these values to parameter indexes, like
`THETA(I)` and `OMEGA(I,J)`. It by default returns a table of
parameters and values in a format similar to `NMreadExt()`, and if
requested it can return detailed information about the text lines
and each element read in the control stream to derive this parameter
table. These details can be used to edit the values and write back
the information in a control stream with consistent
formatting. NMsim::NMwriteInits() does this allowing NMsim() to edit
the `$THETA`, `$OMEGA` and `$SIGMA` sections.

* `NMreadParsText()` now uses `NMreadInits()` by default to index
* `NMreadParsText()` now by default uses `NMreadInits()` to index
parameters. You can still override this by specifying an index
column (the old default) for all or some of the parameter sections.

Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test_NMreadInits.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ test_that("basic",{
lines <- readLines(file.mod)
res1 <- NMreadInits(lines=lines,return="all")

res1

cat(paste(res1$lines$text.before,collapse=":"),"\n")
cat(paste(readRDS(fileRef)$lines$text.before,collapse=":"),"\n")

expect_equal_to_reference(res1,fileRef)


Expand Down

0 comments on commit f07cb4c

Please sign in to comment.