Skip to content

Commit 618a521

Browse files
Kyun-Seop Baecran-robot
authored andcommitted
version 0.5.1
1 parent c4d1272 commit 618a521

File tree

13 files changed

+43
-23
lines changed

13 files changed

+43
-23
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: wnl
2-
Version: 0.5.0
2+
Version: 0.5.1
33
Title: Minimization Tool for Pharmacokinetic-Pharmacodynamic Data
44
Analysis
55
Description: This is a set of minimization tools (maximum likelihood estimation and least square fitting) to solve examples in the Johan Gabrielsson and Dan Weiner's book "Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications" 5th ed. (ISBN:9198299107). Examples include linear and nonlinear compartmental model, turn-over model, single or multiple dosing bolus/infusion/oral models, allometry, toxicokinetics, reversible metabolism, in-vitro/in-vivo extrapolation, enterohepatic circulation, metabolite modeling, Emax model, inhibitory model, tolerance model, oscillating response model, enantiomer interaction model, effect compartment model, drug-drug interaction model, receptor occupancy model, and rebound phenomena model.
@@ -12,5 +12,5 @@ NeedsCompilation: no
1212
LazyLoad: yes
1313
Repository: CRAN
1414
URL: https://cran.r-project.org/package=wnl
15-
Packaged: 2019-05-09 23:00:13 UTC; K
16-
Date/Publication: 2019-05-10 05:50:03 UTC
15+
Packaged: 2019-06-10 15:27:53 UTC; K
16+
Date/Publication: 2019-06-10 16:00:03 UTC

MD5

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
29dc5fe708b6f8d142b570c81663d173 *DESCRIPTION
1+
cbb420ff79f01b61f37dd4b825f016f8 *DESCRIPTION
22
6e182aead6f74b388217bc3a0324aed1 *NAMESPACE
33
117a37f41d92aaa0ca02f28370f0b157 *R/BasicUtil.R
44
19b351cbaa60346e05cfd856ca40af78 *R/Comp1.R
5-
8a303e9889ab5f2e2fbc6c0eea75165b *R/ExpandDH.R
5+
27eba374983f3dd4c5a24228f43b3a19 *R/ExpandDH.R
66
0295aa648727a7c235c793349775d9e4 *R/Objs.R
77
92df4dda26d15a5df93bf94940863c95 *R/Secondary.R
88
ed74bd57f6f5412bbd8cd8998d0e58c5 *R/SolComp2.R
99
7791bb80ef7ff7935d783d3550d08bb7 *R/SolComp3.R
1010
b801ef09ac2e1d9c931f1d08fe4a6b90 *R/cmpChi.R
1111
8451602da7499fe946b9651a018e50bd *R/dx.R
12-
36b8832dd393615d7dac0e467ba12ec2 *R/nComp.R
12+
542e2e6b89b83d764eeb659c1dc73407 *R/nComp.R
1313
1be35636747a8e1af4534c8ae357a046 *R/nlr.R
14-
f422ba48f6c90476e0de760d6c972d50 *R/sysdata.rda
14+
93992a72ede869c9d1980d0c4f2151ac *R/sysdata.rda
1515
43d78a974589c393897dca7131944451 *R/wnl5.R
16-
5e7046e2aae1e60bcf99c7bd8072600c *inst/NEWS.Rd
17-
5b5ba0d4cee87aa87853c541b6c84968 *inst/doc/wnl-manual.pdf
16+
66a56f88c150d82e82ae4ea858169065 *inst/NEWS.Rd
17+
75463c4d3bd42432719b597f93dd859d *inst/doc/Compartment-vignette.pdf
18+
0b43b932b5fbb544fb57f6f78d0a7f0a *inst/doc/wnl-manual.pdf
1819
9e17aba9a349e47eed1a4658ae8c1d43 *man/BasicUtil.Rd
1920
f9ab397c3e89d4acba0f7c5f06e91923 *man/Comp1.Rd
20-
7140e061fba988759ef156f0a830af7f *man/DAT.Rd
21-
fcf1c25de6e2e11ee4e65aba449ecfa8 *man/ExpandDH.Rd
21+
cc44d9f1d6828706027b073be2a8250c *man/DAT.Rd
22+
1d89dcf882509be8a127789a9d87c4c3 *man/ExpandDH.Rd
2223
4c8010f47e5cd1f1c27e78b5b0337e06 *man/Objs.Rd
2324
473916c208b3d722e54944b5f2a4a18f *man/Secondary.Rd
24-
c721ee252fb7c6f42e4ec4fc413546ff *man/SolComp2.Rd
25-
ed43eff40571eec929d48e06e3dc97a9 *man/SolComp3.Rd
25+
43624bff3686aa856271bc124fcb20fd *man/SolComp2.Rd
26+
d704d41d4b9bb62e0586f6a0b54fdd58 *man/SolComp3.Rd
2627
fc55e5845bc733167940373376146426 *man/cmpChi.Rd
2728
e1e7543809d439770aa7d1cb6e897193 *man/dx.Rd
2829
ee0ea2d2db69f309039e2d70a791ac0a *man/e.Rd
29-
c5e8d10aba98a36161b28cc6e5627251 *man/nComp.Rd
30+
62aedc1f108c168426e5402b454b82e1 *man/nComp.Rd
3031
3e4f3583a2a0905de278d8ca52139616 *man/nlr.Rd
3132
8640ba18696633870f706cd63f6d440c *man/wnl-package.Rd
3233
902adeb3c4af0439299bbd830aa6ed04 *man/wnl5.Rd

R/ExpandDH.R

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
ExpandDH = function(DH, Fo = 1)
22
{
33
DH[is.na(DH)] = 0
4-
DH[DH$AMT > 0 & DH$CMT == 1, "AMT"] = Fo * DH[DH$AMT > 0 & DH$CMT==1, "AMT"]
4+
DH[DH$AMT > 0 & DH$CMT == 1, "AMT"] = Fo*DH[DH$AMT > 0 & DH$CMT == 1, "AMT"]
55

66
DH[,"BOLUS"] = 0
77
DH[DH$AMT > 0 & DH$RATE == 0, "BOLUS"] = DH[DH$AMT > 0 & DH$RATE == 0, "AMT"]
8-
8+
99
DH[,"RATE2"] = 0
10+
BlankRow = DH[1,]
11+
BlankRow[1,] = rep(0, ncol(DH))
1012
RateDat = DH[DH$RATE > 0,]
1113
nRate = nrow(RateDat)
1214
for (i in 1:nRate) {
1315
cRATE = RateDat[i, "RATE"]
1416
cCMT = RateDat[i, "CMT"]
1517
cTIME = RateDat[i, "TIME"]
1618
cDUR = RateDat[i, "AMT"] / RateDat[i,"RATE"]
19+
cEND = cTIME + cDUR
20+
if (!(cEND %in% DH[,"TIME"])) {
21+
22+
BlankRow[1, "TIME"] = cEND
23+
DH = rbind(DH, BlankRow)
24+
DH = DH[order(DH$TIME),]
25+
}
1726
DH[DH$TIME >= cTIME & DH$TIME < (cTIME + cDUR), "RATE2"] = DH[DH$TIME >= cTIME & DH$TIME < (cTIME + cDUR), "RATE2"] + cRATE
1827
DH[DH$TIME >= cTIME & DH$TIME < (cTIME + cDUR), "CMT"] = cCMT
1928
}

R/nComp.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
nComp = function(Sol, Ka, DH)
1+
nComp = function(Sol, Ka=0, DH)
22
{
33
L = Sol$L
44
Co = Sol$Co

R/sysdata.rda

-7 Bytes
Binary file not shown.

inst/NEWS.Rd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
\name{NEWS}
22
\title{News for Package \pkg{wnl}}
33

4+
\section{Version 0.5.1 (2019-06-09)}{
5+
\itemize{
6+
\item{DAT table changed.}
7+
}
8+
}
9+
410
\section{Version 0.5.0 (2019-05-09)}{
511
\itemize{
612
\item{Analytical solutions of compartmental models added.}

inst/doc/Compartment-vignette.pdf

82.7 KB
Binary file not shown.

inst/doc/wnl-manual.pdf

797 Bytes
Binary file not shown.

man/DAT.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is a conventional NONMEM input data format.
99
}
1010
\usage{RptCfg}
1111
\format{
12-
This data frame has 5 columns with 19 time-points for the simulation.
12+
This data frame has 5 columns with 18 time-points for the simulation.
1313
\describe{
1414
\item{\code{TIME}}{Time}
1515
\item{\code{AMT}}{Amount given for the compartment of \code{CMT} column}

man/ExpandDH.Rd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ It expands dosing history table of conventional NONMEM data format. It calculate
1818
Returns expanded dosing history table.
1919
}
2020
\author{Kyun-Seop Bae <k@acr.kr>}
21-
21+
\examples{
22+
DAT
23+
ExpandDH(DAT) # One observation point is increased at the time of 27.
24+
}
2225
\keyword{Dosing history}

man/SolComp2.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\name{SolComp2}
22
\alias{SolComp2}
3-
\title{Analytical Solution for Two-compartment Model}
3+
\title{Get Lambdas and Coefficients of Two-compartment Model}
44
\description{
55
It calculates lambdas and coefficients for two-compartment model from K10, K12, and K21.
66
}

man/SolComp3.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\name{SolComp3}
22
\alias{SolComp3}
3-
\title{Analytical Solution for Three-compartment Model}
3+
\title{Get Lambdas and Coefficients of Three-compartment Model}
44
\description{
55
It calculates lambdas and coefficients for three-compartment model from K10, K12, K21, K13, and K31.
66
}

man/nComp.Rd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
\name{nComp}
22
\alias{nComp}
3-
\title{Multi-compartment model - analytical}
3+
\title{Get Amounts of Each Compartments using Lambdas and Coefficients of Multi-compartment Model}
44
\description{
55
It calculates using multi-compartment model.
66
}
77
\usage{
8-
nComp(Sol, Ka, DH)
8+
nComp(Sol, Ka=0, DH)
99
}
1010
\arguments{
1111
\item{Sol}{Solution list of lambdas and coefficients}
@@ -14,6 +14,7 @@ nComp(Sol, Ka, DH)
1414
}
1515
\details{
1616
First compartment is the gut compartment for oral dosing. IV bolus and infusion dosing should be done at the second compartment.
17+
If a bolus dose was given at time T, it is reflected at times of larger than T. This is more close to real observation. ADAPT does like this, but NONMEM does not.
1718
}
1819
\value{
1920
This returns a table with the gut and the other compartment columns

0 commit comments

Comments
 (0)