From 162456b2467e60ba2de806622cbe6664e4769da9 Mon Sep 17 00:00:00 2001 From: Philip Delff Date: Sat, 14 Dec 2024 12:51:56 -0500 Subject: [PATCH] NMrelate now respects par.type --- DESCRIPTION | 2 +- NEWS.md | 2 ++ R/NMrelate.R | 3 +-- R/zzz.R | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f46c6145..aa949332 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.8.905 +Version: 0.1.8.906 Authors@R: c(person(given="Philip", family="Delff", email = "philip@delff.dk", diff --git a/NEWS.md b/NEWS.md index dc5214bd..4255b3d3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ * `NMwriteSection()` would fail if the first section in a control stream was modified. +* `NMrelate()` was ignoring the `par.type` argument. + # NMdata 0.1.8 ## New features diff --git a/R/NMrelate.R b/R/NMrelate.R index 85289155..fc16d080 100644 --- a/R/NMrelate.R +++ b/R/NMrelate.R @@ -29,7 +29,6 @@ NMrelate <- function(file,lines,modelname,par.type,col.model,sections,as.fun){ text <- NULL - par.type <- NULL if(missing(file)) file <- NULL if(missing(lines)) lines <- NULL @@ -46,7 +45,7 @@ NMrelate <- function(file,lines,modelname,par.type,col.model,sections,as.fun){ lines <- getLines(file=file,lines=lines,col.model=col.model,modelname=modelname,as.one=TRUE) - + list.relate <- lapply(par.type,function(tp) { lines[,NMrelateOne(lines=text,par.type=tp,as.fun="data.table"),by=col.model] }) diff --git a/R/zzz.R b/R/zzz.R index dd07ff37..8b6bf89f 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -7,5 +7,5 @@ NMdataConf(reset=TRUE) ##' @importFrom utils packageVersion .onAttach <- function(libname,pkgname){ - packageStartupMessage(paste0("NMdata ",packageVersion("NMdata"),". Browse NMdata documentation at\nhttps://nmautoverse.github.io/NMdata/")) + packageStartupMessage(paste0("NMdata ",packageVersion("NMdata"),". Browse NMdata documentation at\nhttps://NMautoverse.github.io/NMdata/")) }