diff --git a/DESCRIPTION b/DESCRIPTION index 36081d9e..c010ed90 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: NMdata Type: Package Title: Preparation, Checking and Post-Processing Data for PK/PD Modeling -Version: 0.1.7 +Version: 0.1.7.901 Authors@R: c(person(given="Philip", family="Delff", email = "philip@delff.dk", diff --git a/NEWS.md b/NEWS.md index 2fe84a9b..fe12e58f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +# NMdata 0.1.8 + +## Bugfixes + +Support for data file names including substrings "ACCEPT" and "IGN" is +added. Before, such data set file names could lead to failure if +interpreting data subsetting filters (ACCEPT and IGN(ORE)) in Nonmem +control streams. # NMdata 0.1.7 @@ -104,7 +112,7 @@ of throwing an error. * Function `NMreadShk()` to read and format `.shk` (shrinkage) files. * Functions `mat2dt()` and `dt2mat()` included to convert between - matrices and data.frame format of matrix data - especially for + matrices and `data.frame` format of matrix data - especially for symmetric matrices. * Function `addOmegaCorr()` adds estimated correlation between ETAs to diff --git a/R/NMapplyFilters.R b/R/NMapplyFilters.R index 91bd0df3..5023cfb5 100644 --- a/R/NMapplyFilters.R +++ b/R/NMapplyFilters.R @@ -31,7 +31,7 @@ NMapplyFilters <- function(data,file,text,lines,invert=FALSE,as.fun,quiet) { value <- NULL ### Section end: Dummy variables, only not to get NOTE's in pacakge checks - + if(missing(quiet)) quiet <- NULL quiet <- NMdataDecideOption("quiet",quiet) @@ -71,11 +71,19 @@ NMapplyFilters <- function(data,file,text,lines,invert=FALSE,as.fun,quiet) { ## simplifying so IGNORE/IGN is always IGN text3 <- gsub("IGNORE","IGN",text3) - conds.sc <- regmatches(text3, gregexpr("(?:IGN) *=* *[^ (+=]",text3)) + + ## ^(.* )* : if anything before IGN, there must be a space in between + ## conds.sc <- regmatches(text3, gregexpr("^(.* )*(?:IGN) *=* *[^ (+=]",text3)) + conds.sc <- regmatches(text3, gregexpr("(?