Skip to content

Commit

Permalink
Fix eta facet names inaccurate grouping (UUPharmacometrics#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
billdenney committed Mar 25, 2019
1 parent 4187bf5 commit 69eca9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# xpose 0.4.4.9000
### General
* Fixed issue when ETA values were not named as ETA(X) in NONMEM (@billdenney #144)

# xpose 0.4.4
### General
* Improved documentation for `xpose_data` (@billdenney #99)
Expand Down
4 changes: 3 additions & 1 deletion R/plot_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ eta_distrib <- function(xpdb,
stop('No eta column found in the xpdb data index.', call. = FALSE)
}

if (software(xpdb) == 'nonmem') {
# eta reordering only occurs if all ETAs match the pattern ETA(X) where X is a
# number.
if (all(grepl(pattern="^ETA\\([0-9]+\\)$", x=eta_col))) {
post_processing_eta <- reorder_factors(prefix = 'ETA(', suffix = ')')
} else {
post_processing_eta <- NULL
Expand Down

0 comments on commit 69eca9e

Please sign in to comment.