Skip to content

Commit

Permalink
submission 1 of 0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
philipdelff committed Aug 26, 2024
1 parent 2f8ba35 commit 59d3963
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 41 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: NMdata
Type: Package
Title: Preparation, Checking and Post-Processing Data for PK/PD Modeling
Version: 0.1.6.961
Version: 0.1.7
Authors@R:
c(person(given="Philip", family="Delff",
email = "philip@delff.dk",
Expand Down
53 changes: 30 additions & 23 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# 0.1.7
# NMdata 0.1.7

## New features
* `NMreadPartab()` has been generalized to support comment formats very
Expand All @@ -9,7 +9,7 @@
any structure should be supported as long as delimitors are not
alphabetic or numeric (so any special characters should
work). Notice, delimitors can change between fields . Example:
"$THETA 1.4 ; 3 - CL (Clearance) [L/h]" would be matched by
`"$THETA 1.4 ; 3 - CL (Clearance) [L/h]"` would be matched by
`NMreadPartab(...,format="%init ;%idx-%symbol(%label)[%unit]")`
which would then return a table including columns init, idx, symbol,
label, and unit. The comments must be systematic within say `$THETA`
Expand Down Expand Up @@ -37,28 +37,25 @@
data sets. The `common.cols` argument replaces `fun.commoncols` with
added functionality.


\itemize{

\item `common.cols="merge.by"` to include them in by, even
- `common.cols="merge.by"` to include them in by, even
if they are not provided in the `by` argument.

\item `common.cols="drop.x"` to drop the columns on the `x` and
- `common.cols="drop.x"` to drop the columns on the `x` and
overwrite with columns in y

\item `common.cols="drop.y"` to preserve in `x`
- `common.cols="drop.y"` to preserve in `x`


\item `base::stop` The default value. Throw an error if common.columns
- `base::stop` The default value. Throw an error if common.columns
are not included in merge `by` options.

\item `common.cols=NULL` disabled handling and return columns as ".x"
- `common.cols=NULL` disabled handling and return columns as ".x"
and ".y".

\item Any function. `common.cols=warning` will issue a warning instead
- Any function. `common.cols=warning` will issue a warning instead
of throwing an error.

}


* `NMreadExt()` separates objective function values into a separate list
element. The `return` argument is used to control what data to
Expand Down Expand Up @@ -98,7 +95,9 @@ of throwing an error.
* `NMreadExt()` would mess up iterations and parameter estimates if
`as.fun` was set to returning something else than `data.table`s. Fixed.

# 0.1.6


# NMdata 0.1.6

## New features

Expand All @@ -124,7 +123,7 @@ of throwing an error.
`ADDL` and `II`) followed by other doses. Fixed. Thanks to Simone
Cassani for catching it.

# 0.1.5
# NMdata 0.1.5
## New features
* `countFlags` no longer needs a table of flags. By default it will
summarize the ones found in data. If additional flags wanted in
Expand Down Expand Up @@ -158,7 +157,9 @@ of throwing an error.
so). Now `NMdataConf(reset=TRUE)` makes sure to wipe all such
configuration if exists.

# 0.1.4


# NMdata 0.1.4

## New functions
* `NMreadParsText()` is a new function to extract comments to
Expand Down Expand Up @@ -194,7 +195,7 @@ tables.
* `NMreadText` would fail to disregard some comment lines when
`keep.comments=FALSE`. Fixed.

# 0.1.3
# NMdata 0.1.3
* Better support for models with multiple estimation
steps. Particularly reading output tables now better distinguishes
between Nonmem table numbers and repetitions (like
Expand All @@ -204,7 +205,7 @@ tables.
* Improved support for reading multiple models with NMreadExt and
NMreadPhi.

# 0.1.2
# NMdata 0.1.2
## New features
* NMreadExt is a new function that reads parameter estimates,
uncertainties if available, estimation iterations and other
Expand All @@ -223,7 +224,7 @@ NMreadPhi.
arguments.


# 0.1.1
# NMdata 0.1.1
## New features
* NMwriteSection can now handle functions to perform control stream
editing. NMwriteSection provides methods to edit control
Expand All @@ -239,7 +240,7 @@ NMreadPhi.
with a directory (`dir`) only.
* Minor bugfix in compareCols in case input is an unnamed list

# 0.1.0
# NMdata 0.1.0

## New features
* The super fast `fst` format is now supported. Data sets can be
Expand Down Expand Up @@ -308,7 +309,7 @@ This release provides a few bugfixes, nothing major.
cumulative number and it aligns with col.doscuma which is the
cumulative amount.

# 0.0.16
# NMdata 0.0.16
## New features
* `NMwriteSection()` includes argument `location`. In combination with
`section`, this determines where the new section is
Expand All @@ -332,11 +333,11 @@ on file. This has been fixed to support cases where renaming or a
pseudonym is being used to generate an `ID` column in `$INPUT`.


# 0.0.15
# NMdata 0.0.15
This update is of no difference to users. A technicality has been
chaned to ensure consistent test results once data.table 1.14.7 is

# 0.0.14
# NMdata 0.0.14
## New features
* `fnExtension()` has been generalized. It now ignores leading spaces in
new extension, and extensions with zero or one leading period are
Expand Down Expand Up @@ -399,9 +400,13 @@ chaned to ensure consistent test results once data.table 1.14.7 is
identifier is simplified.

* NMdata version added to welcome message.
# 0.0.13



# NMdata 0.0.13

## New functions

* `NMexpandDoses()` - Transform repeated dosing events (`ADDL`/`II`)
to individual dosing events
* `addTAPD()` - Add cumulative number of doses, time of last dose,
Expand All @@ -411,12 +416,14 @@ chaned to ensure consistent test results once data.table 1.14.7 is
has long been part of NMdata but has not been exported until now.

## New data

* A new data set called mad is included. It is based on the
mad_missing_duplicates from the `xgxr` package. Doses are implemented
using ADDL and II (so only one dosing row per subject). It is
included for testing the new NMexpandDoses and addTAPD functions.

## Bugfixes

* Non-critical bugfix in mergeCheck dimensions overview printed to
console. One column too many was reported in input and result
data. No implications on results from mergeCheck.
Expand Down
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,6 @@ read multiple models and compare their predictions.
``` r
res <- NMscanMultiple(dir=system.file("examples/nonmem", package="NMdata"),
file.pattern="xgxr.*\\.lst",as.fun="data.table",quiet=TRUE)
#>
#> Overview of model scanning results:
#> lst nrows
#> 1: /data/home/philipde/wdirs/NMdata/inst/examples/nonmem/xgxr001.lst 905
#> 2: /data/home/philipde/wdirs/NMdata/inst/examples/nonmem/xgxr002.lst 905
#> 3: /data/home/philipde/wdirs/NMdata/inst/examples/nonmem/xgxr003.lst 905
#> 4: /data/home/philipde/wdirs/NMdata/inst/examples/nonmem/xgxr014.lst 905
#> 5: /data/home/philipde/wdirs/NMdata/inst/examples/nonmem/xgxr018.lst 905
#> ncols success warning
#> 1: 40 TRUE FALSE
#> 2: 34 TRUE FALSE
#> 3: 34 TRUE FALSE
#> 4: 36 TRUE FALSE
#> 5: 33 TRUE FALSE
gmean <- function(x)exp(mean(log(x)))
res.mean <- res[,.(gmeanPRED=gmean(PRED)),by=.(model,NOMTIME)]
obs.all <- unique(res[,.(ID,NOMTIME,TIME,DV)])
Expand Down
11 changes: 11 additions & 0 deletions devel/scripts/check_NMdata.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@


library(devtools)

load_all()

res.test <- test()
res.chek <- check()


devtools::build_readme()
setwd("~/wdirs/NMdata")
library(rmarkdown)
render("NEWS.md")

library(pkgdown)
pkgdown::build_news()
6 changes: 3 additions & 3 deletions devel/todo.org
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ With load_all():
function is called from other functions. Possible to distinguish
somehow?
** High level features
*** TODO [#A] Support for DATE type columns
*** DONE Support for DATE type columns
** New functions
*** document columns
**** TODO Check for existence of char column in values
Expand Down Expand Up @@ -439,7 +439,7 @@ if return="iterations" only return iterations
*** NMreadTabSlow
**** TODO [#A] Only handle Table numbers if "TABLE..." strings found
*** NMreadParsText
**** DONE [#A] order columns - created ones to the right
**** DONE order columns - created ones to the right
**** DONE change num to idx
and include a field.idx so user can specify what to use. If idx is not
taken from fields, it should not come out in the results.
Expand All @@ -449,7 +449,7 @@ in which case "; [" is a delimiter
**** DONE Empty fields make it break
Like ;1;CL;;;mL/h
**** TODO [#B] Handle SAME
***** DONE [#A] Include test so we at least know what happens
***** DONE Include test so we at least know what happens
*** NMreadSection
**** DONE error returned when return="idx" and no section specified :Bug:
**** TODO [#B] return="text"/"idx" should be return.idx=TRUE/FALSE instead
Expand Down
Binary file modified man/figures/README-unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 59d3963

Please sign in to comment.