Introduction
To run the tests, the package must be installed with its tests:
- To install from CRAN:
- To install from GitHub:
Testing and validation that results match in a local environment compared to the original environment is an important part of confirmation that a package works as expected.
Re-running this vignette in your local environment will confirm that local results match those in the original package development. Test success is confirmed by the existence of no failed tests; warnings are expected during testing (and not shown in this vignette for that reason); and some tests may be skipped, but those are expected as well.
Summary of Testing
The following sentence is dynamically generated to summarize the testing results: All tests passed.
Testing Log
Interval columns
test-001-add.interval.col.R |
add.interval.col |
16 |
0 |
AIC.list testing
test-AIC.list.R |
AIC.list |
5 |
0 |
test-AIC.list.R |
get.first.model |
15 |
0 |
test-AIC.list.R |
get.best.model |
1 |
0 |
AUC and AUMC
test-auc.R |
pk.calc.auxc |
9 |
0 |
test-auc.R |
pk.calc.auc |
94 |
0 |
test-auc.R |
pk.calc.auc.last |
2 |
0 |
test-auc.R |
pk.calc.auc.inf |
2 |
0 |
test-auc.R |
pk.calc.auc.all |
2 |
0 |
test-auc.R |
pk.calc.aumc |
3 |
0 |
test-auc.R |
pk.calc.aumc.inf |
2 |
0 |
test-auc.R |
pk.calc.aumc.all |
2 |
0 |
test-auc.R |
pk.calc.aumc.last |
2 |
0 |
test-auc.R |
pk.calc.auc.inf.pred |
1 |
0 |
test-auc.R |
pk.calc.aumc.inf.obs |
1 |
0 |
test-auc.R |
pk.calc.aumc.inf.pred |
1 |
0 |
aucint
test-aucint.R |
AUCint gives errors appropriately |
18 |
0 |
test-aucint.R |
AUCint gives the same value when no interpolation/extrapolation is required |
3 |
0 |
test-aucint.R |
AUCint gives a warning and NA when it cannot interpolate or extrapolate a value |
4 |
0 |
test-aucint.R |
AUCint respects auc.type and does the correct calculations for each AUC type |
9 |
0 |
test-aucint.R |
aucint respects doses |
3 |
0 |
test-aucint.R |
aucint works with infinite intervals |
4 |
0 |
AUC interval checking
test-check.intervals.R |
check.interval.specification |
24 |
0 |
test-check.intervals.R |
check.interval.deps |
1 |
0 |
test-check.intervals.R |
get.parameter.deps |
5 |
0 |
test-check.intervals.R |
check.intervals requires a valid value |
1 |
0 |
Determining tau for AUCs
test-choose-intervals.R |
find.tau |
16 |
0 |
test-choose-intervals.R |
choose.auc.intervals |
10 |
0 |
Class generation-general
test-class-general.R |
getColumnValueorNot |
3 |
0 |
test-class-general.R |
setAttributeColumn |
19 |
0 |
test-class-general.R |
getAttributeColumn |
10 |
0 |
test-class-general.R |
getDataName.default returns NULL |
4 |
0 |
Class generation-PKNCAconc
test-class-PKNCAconc.R |
PKNCAconc |
12 |
0 |
test-class-PKNCAconc.R |
PKNCAconc with input other than data.frames |
1 |
0 |
test-class-PKNCAconc.R |
model frame and parameter extractions |
12 |
0 |
test-class-PKNCAconc.R |
split.PKNCAconc |
5 |
0 |
test-class-PKNCAconc.R |
print.PKNCAconc |
3 |
0 |
test-class-PKNCAconc.R |
summary.PKNCAconc |
1 |
0 |
test-class-PKNCAconc.R |
PKNCAconc with exclusions |
1 |
0 |
test-class-PKNCAconc.R |
PKNCAconc with duration |
1 |
0 |
test-class-PKNCAconc.R |
PKNCAconc with nominal time added |
2 |
0 |
test-class-PKNCAconc.R |
PKNCAconc with volume added |
3 |
0 |
Class generation-PKNCAdata
test-class-PKNCAdata.R |
PKNCAdata |
10 |
0 |
test-class-PKNCAdata.R |
PKNCAdata with no or limited dose information |
4 |
0 |
test-class-PKNCAdata.R |
print.PKNCAdata |
3 |
0 |
test-class-PKNCAdata.R |
summary.PKNCAdata |
1 |
0 |
test-class-PKNCAdata.R |
splitting PKNCAdata |
1 |
0 |
test-class-PKNCAdata.R |
no intervals auto-determined (Fix GitHub issue #84) |
3 |
0 |
test-class-PKNCAdata.R |
Ensure that unexpected arguments to PKNCAdata give an error (related to issue #83) |
1 |
0 |
test-class-PKNCAdata.R |
intervals may be a tibble |
1 |
0 |
Class generation-PKNCAdose
test-class-PKNCAdose.R |
PKNCAdose |
12 |
0 |
test-class-PKNCAdose.R |
PKNCAdose without a data.frame as input |
1 |
0 |
test-class-PKNCAdose.R |
PKNCAdose model.frame |
13 |
0 |
test-class-PKNCAdose.R |
print.PKNCAdose |
4 |
0 |
test-class-PKNCAdose.R |
PKNCAdose with exclusions |
1 |
0 |
test-class-PKNCAdose.R |
PKNCAdose route and duration |
6 |
0 |
test-class-PKNCAdose.R |
time.nominal within PKNCAdose |
3 |
0 |
test-class-PKNCAdose.R |
setDuration |
3 |
0 |
Class generation-PKNCAresults
test-class-PKNCAresults.R |
PKNCAresults generation |
8 |
0 |
test-class-PKNCAresults.R |
PKNCAresults has exclude, when applicable |
3 |
0 |
test-class-PKNCAresults.R |
PKNCAresults summary |
6 |
0 |
test-class-PKNCAresults.R |
dropping start and end from groups is allowed with a warning. |
2 |
0 |
test-class-PKNCAresults.R |
summary.PKNCAresults manages exclusions as missing not as non-existent. |
3 |
0 |
test-class-PKNCAresults.R |
print.summary_PKNCAresults works |
1 |
0 |
test-class-PKNCAresults.R |
ptr works as a parameter |
1 |
0 |
test-class-PKNCAresults.R |
exclude values are maintained in derived parameters during automatic calculation (#112) |
3 |
0 |
test-class-PKNCAresults.R |
ctrough is correctly calculated |
1 |
0 |
Missing and BLQ data cleaners
test-cleaners.R |
clean.conc.na |
19 |
0 |
test-cleaners.R |
clean.conc.blq |
27 |
0 |
exclude_nca
test-exclude_nca.R |
exclude_nca |
9 |
0 |
exclude
test-exclude.R |
setExcludeColumn |
14 |
0 |
test-exclude.R |
exclude.default |
17 |
0 |
test-exclude.R |
normalize_exclude makes blanks into NA_character_ |
3 |
0 |
Check Conversion
test-general.functions.R |
check.conversion |
3 |
0 |
Rounding to string values
test-general.functions.R |
Rounding |
21 |
0 |
test-general.functions.R |
Significance |
33 |
0 |
test-general.functions.R |
signifString stops when bad arguments are passed |
1 |
0 |
test-general.functions.R |
max_na and min_na |
8 |
0 |
Half-life
test-half.life.R |
pk.calc.half.life |
11 |
0 |
test-half.life.R |
half-life manual point selection |
5 |
0 |
test-half.life.R |
two-point half-life succeeds (fix #114) |
2 |
0 |
Interpolation and extrapolation of concentration
test-interpolate.conc.R |
extrapolate.conc |
25 |
0 |
test-interpolate.conc.R |
interpolate.conc |
32 |
0 |
test-interpolate.conc.R |
interp.extrap.conc |
5 |
0 |
test-interpolate.conc.R |
interp.extrap.conc.dose handles all eventualities |
25 |
0 |
test-interpolate.conc.R |
interp.extrap.conc.dose |
26 |
0 |
merging lists
test-merge.R |
merge.splitlist |
8 |
0 |
Business rule functions
test-pk.business.rules.R |
geomean |
10 |
0 |
test-pk.business.rules.R |
geosd |
2 |
0 |
test-pk.business.rules.R |
geocv |
2 |
0 |
test-pk.business.rules.R |
business.mean |
6 |
0 |
test-pk.business.rules.R |
pk.business |
5 |
0 |
All NCA calculations
test-pk.calc.all.R |
pk.nca |
14 |
0 |
test-pk.calc.all.R |
Calculations when dose time is missing |
1 |
0 |
test-pk.calc.all.R |
Calculations when no dose info is given |
2 |
0 |
test-pk.calc.all.R |
pk.nca with exclusions |
3 |
0 |
test-pk.calc.all.R |
pk.calc.all with duration.dose required |
1 |
0 |
test-pk.calc.all.R |
half life inclusion and exclusion |
2 |
0 |
test-pk.calc.all.R |
No interval requested (e.g. for placebo) |
2 |
0 |
test-pk.calc.all.R |
Volume-related calculations |
2 |
0 |
test-pk.calc.all.R |
pk.nca can calculate values with group-level data |
1 |
0 |
test-pk.calc.all.R |
Missing dose info for some subjects gives a warning, not a difficult-to-interpret error |
2 |
0 |
test-pk.calc.all.R |
Ensure that options are respected during pk.nca call |
1 |
0 |
C0 Calculations
test-pk.calc.c0.R |
pk.calc.c0 |
10 |
0 |
test-pk.calc.c0.R |
pk.calc.c0.method.logslope |
6 |
0 |
test-pk.calc.c0.R |
pk.calc.c0.method.c0 |
2 |
0 |
test-pk.calc.c0.R |
pk.calc.c0.method.c1 |
5 |
0 |
test-pk.calc.c0.R |
pk.calc.c0.method.set0 |
2 |
0 |
test-pk.calc.c0.R |
pk.calc.c0.method.cmin |
2 |
0 |
Dose-normalized NCA functions
test-pk.calc.dn.R |
pk.calc.dn |
3 |
0 |
test-pk.calc.dn.R |
pk.calc.cmax |
1 |
0 |
Simple NCA functions
test-pk.calc.simple.R |
adj.r.squared |
4 |
0 |
test-pk.calc.simple.R |
pk.calc.cmax |
12 |
0 |
test-pk.calc.simple.R |
pk.calc.cmin |
12 |
0 |
test-pk.calc.simple.R |
pk.calc.tmax |
8 |
0 |
test-pk.calc.simple.R |
pk.calc.tlast |
7 |
0 |
test-pk.calc.simple.R |
pk.calc.clast.obs |
7 |
0 |
test-pk.calc.simple.R |
pk.calc.thalf.eff |
3 |
0 |
test-pk.calc.simple.R |
pk.calc.kel |
3 |
0 |
test-pk.calc.simple.R |
pk.calc.cl |
7 |
0 |
test-pk.calc.simple.R |
pk.calc.f |
9 |
0 |
test-pk.calc.simple.R |
pk.calc.aucpext |
13 |
0 |
test-pk.calc.simple.R |
pk.calc.mrt |
1 |
0 |
test-pk.calc.simple.R |
pk.calc.mrt.iv |
4 |
0 |
test-pk.calc.simple.R |
pk.calc.mrt.md |
2 |
0 |
test-pk.calc.simple.R |
pk.calc.vz |
13 |
0 |
test-pk.calc.simple.R |
pk.calc.vss and its wrappers |
3 |
0 |
test-pk.calc.simple.R |
pk.calc.vd and its wrappers |
8 |
0 |
test-pk.calc.simple.R |
pk.calc.cav |
3 |
0 |
test-pk.calc.simple.R |
pk.calc.ctrough |
4 |
0 |
test-pk.calc.simple.R |
pk.calc.ptr |
2 |
0 |
test-pk.calc.simple.R |
pk.calc.tlag |
4 |
0 |
test-pk.calc.simple.R |
pk.calc.deg.fluc |
2 |
0 |
test-pk.calc.simple.R |
pk.calc.swing |
3 |
0 |
test-pk.calc.simple.R |
pk.calc.ceoi |
3 |
0 |
Urine
test-pk.calc.urine.R |
pk.calc.ae |
1 |
0 |
test-pk.calc.urine.R |
pk.calc.clr |
3 |
0 |
test-pk.calc.urine.R |
pk.calc.fe |
2 |
0 |
PKNCA option setting
test-PKNCA.options.R |
PKNCA.options |
92 |
0 |
test-PKNCA.options.R |
PKNCA.choose.option |
9 |
0 |
PKNCA summary setting
test-PKNCA.options.R |
PKNCA.set.summary input checking |
13 |
0 |
test-PKNCA.options.R |
PKNCA.set.summary exists for all paramters |
1 |
0 |
test-PKNCA.options.R |
PKNCA.options.describe |
1 |
0 |
test-PKNCA.options.R |
PKNCA.options fails when setting defaults and another option simultaneously |
1 |
0 |
Provenance
test-provenance.R |
provenance |
10 |
0 |
Superposition
test-superpostion.R |
superposition inputs |
74 |
0 |
test-superpostion.R |
superposition math |
14 |
0 |
test-superpostion.R |
PKNCAconc superposition |
1 |
0 |
time_calc()
test-time_calc.R |
Numeric time_calc() is successful with all scalar combinations of number and NA and numeric order. |
9 |
0 |
test-time_calc.R |
Numeric time_calc() is successful with all vector combinations of number and NA and numeric order. |
5 |
0 |
test-time_calc.R |
POSIXt objects work |
5 |
0 |
test-time_calc.R |
difftime |
4 |
0 |
Time to steady-state
test-time.to.steady.state.R |
pk.tss.data.prep |
11 |
0 |
test-time.to.steady.state.R |
pk.tss.stepwise.linear |
15 |
0 |
test-time.to.steady.state.R |
pk.tss.monoexponential |
9 |
0 |
test-time.to.steady.state.R |
pk.tss |
7 |
0 |