Steady state is analysed over the dosing interval. txtNCA, pdfNCA and rtfNCA gain tau (the dosing interval; in pdfNCA and rtfNCA a scalar or one value per NCA, like dose) and unitTau (its unit, default "h"), which are required when SS=TRUE and passed through to NonCompart. The reports gain the lines AUCTAU (AUC over one dosing interval) and CAVG (average concentration, AUCTAU/tau), and their Calculation Setting section now states the dosing interval that CL and Vz were derived over. Requires NonCompart (>= 0.8.4), where SS=TRUE now divides the dose by AUCTAU instead of AUCLST; a report produced with SS=TRUE by 0.7.1 therefore printed a CL and a Vz that were right only when the last sample fell exactly at tau.
SS=TRUE without tau stops before the report file is opened; a tau given with SS=FALSE is ignored with a warning. The argument checks of pdfNCA and rtfNCA (count of dose, dur, now tau, and the shape of UsePoints) were moved ahead of the file open; they used to run after the title page, so a wrong-length dose or dur stopped with the pdf device still open and an empty file already on disk.
Res2Txt gains SS, tau and unitTau so that the steady-state line can be printed; the internal RptCfg table carries AUCTAU and CAVG (50 rows), so the two new parameters print with their CDISC synonyms instead of the “Interval AUC” fallback.
pdfOQ gains three steady-state cases: two Tier A cases on a fixture whose AUCtau is the hand-summable trapezoid 66 (tau in hours, and the same tau in days), and a report-versus-table case that requires the rendered AUCTAU, CAVG, CLFO and VZFO to equal the tblNCA values at the printed precision.
Added regression test ‘tests/Test-SS.R’.
The admissibility gate in Res2Txt now matches sNCA. It previously refused any profile with fewer than three non-zero concentrations, so txtNCA, pdfNCA and rtfNCA printed “Too few non-zero points for NCA” for profiles that sNCA and tblNCA still summarise, leaving the report contradicting the analysis table for the same input. Conversely negative concentrations were rendered even though sNCA rejects them and returns all NA. Now empty, length-mismatched or negative concentration data is refused, a profile with no measurable concentration at all is refused with the existing message, and profiles with one or two measurable concentrations are reported consistently with tblNCA. NA removal was moved ahead of the gate so the test is applied to the analysed data.
Requires NonCompart (>= 0.8.3), which fixes CLSTP and the returned UsedPoints indices when UsePoints is supplied. pdfNCA, rtfNCA and txtNCA inherited both defects, so a report produced with UsePoints could disagree with tblNCA for the same profile in CLSTP, AUCIFP, AUCIFPD, AUCPEP, AUMCIFP, AUMCPEP, VZFP, CLFP and MRTEVIFP.
pdfNCA and rtfNCA now stop when UsePoints is not a list. A bare vector carrying one index per NCA passed the existing length test, and UsePoints[[i]] then handed sNCA a single index, which it ignores in favour of automatic slope selection - so the report was produced by a different method than the one requested, without a word. NonCompart 0.8.3 makes the matching check in tblNCA.
Added regression test ‘tests/Test-Res2Txt.R’.
pdfOQ gains six operational test cases. The eight existing cases compare against WinNonlin 6.4 outputs on Theoph and Indometh, neither of which contains a trailing or an embedded BLQ sample and neither of which exercises UsePoints, and none of them runs the reporting layer at all; a build carrying every defect listed above still reported QUALIFIED. Three new Tier A cases (independent, closed-form reference) run a synthetic fixture with a lag-phase zero, an embedded BLQ inside the lambda z window and trailing BLQ, covering automatic slope selection, an explicit UsePoints fit, and a round trip that feeds the reported UsedPoints back in. Three further cases carry no external reference and instead require the rendered report to agree with the analysis table for the same profile: every printed parameter must equal the tblNCA value at the printed precision, a profile with two measurable concentrations must be reported rather than refused, and a profile with a negative concentration must be refused because tblNCA returns all NA.
pdfPQ no longer truncates profile identifiers in its report. The PROFILE column was a fixed 14 characters wide (12 in the expected-value table and the failed-check list) and the identifier was cut to fit, so a multi-column key rendered as “DA-4505/01-S” for every subject - identical text for profiles that are not the same. The column is now sized to the longest identifier present, and where even that will not fit on a line the row is split instead of cut. Numeric key values are formatted to 7 significant digits rather than the up-to-15 that as.character emits. NonCompart 0.8.3 makes the same change in PQNCA.
Fixed the expected-value comparison in pdfPQ. A parameter that was NA on both sides - not estimable for that profile, and not expected to be - was counted as a difference, because the comparator computed a relative difference and then required it to be non-NA. Supplying expected therefore produced “expected-values DIFFER” and an overall NOT QUALIFIED for a correct analysis whenever any profile lacked a terminal phase, which is routine in real data. The reproducibility check in the same function already treated NA/NA as equal, so the two comparators inside one report disagreed with each other. Both NA now counts as agreement; one side NA and the other a number is still a difference.
The pdfPQ report now states what its reproducibility check does and does not establish. Re-running the analysis on the same data shows only that the analysis is deterministic; a deterministic error reproduces exactly, so the check cannot detect a wrong answer, and the report no longer leaves that to be inferred.
pdfOQ test cases may now supply an inline data frame instead of naming a datasets object, and may set roundTrip=TRUE or reportCheck=TRUE.
pdfIQ added: generates a self-contained Installation Qualification (IQ) report in pdf that documents whether ncar and NonCompart are correctly installed, intact, loadable, and operational in the user's R environment (environment, package versions, dependency satisfaction, MD5 file integrity, namespace/exports, a functional NCA check against an external reference, and an overall QUALIFIED/NOT QUALIFIED verdict with a sessionInfo appendix).
pdfOQ added: generates a self-contained Operational Qualification (OQ) report in pdf. It runs a set of NCA test cases (eight WinNonlin-referenced scenarios shipped in ‘inst/OQ’) through tblNCA on the user's machine and compares every parameter for every subject to the pre-specified reference within a relative tolerance. The report lists every computed value next to its reference value, the absolute and relative difference, and a pass flag, with an overall QUALIFIED/NOT QUALIFIED verdict.
writeMD5 added: writes the standard R ‘MD5’ integrity manifest into an installed package directory (using tools::md5sum), so that the pdfIQ file-integrity check reports PASS for local installs. CRAN installs already include this manifest.
pdfPQ added: a Performance Qualification (PQ) report generator. It runs the analysis the user intends on the user's own data and checks reproducibility, per-profile scientific plausibility, and (optionally) agreement with the user's expected values, with an input-data md5 fingerprint and a signed record.
pdfNCA now prints “Performed by” / “Reviewed by” approval lines (and an optional performedBy name) on the first page.
addSigField added (and a sigField argument to pdfIQ/pdfOQ/pdfPQ): insert Adobe Acrobat Reader signature fields into the report PDF (pure base-R PDF incremental update, no external tools) so it can be signed with one click in the free Acrobat Reader, instead of printing and scanning.
signPDF and verifyPDF added: digitally sign a report PDF (a detached SHA-256 signature written to ‘<pdf>.sig’, using the openssl package) and verify it, as a scriptable alternative.
The IQ and OQ reports use 1 inch margins on every side, select Letter paper in a United States locale and A4 elsewhere (paper argument), place the signature/approval page first, and include a per-file md5 checksum appendix (IQ).
The dependency on the archived rtf package was removed. The subset of rtf functions required by rtfNCA is now vendored internally in ‘R/rtf_utils.R’ (originally authored by Michael E. Schaffer, GPL (>= 2)).
txtNCA, pdfNCA, and rtfNCA support indices of points (UsePoints) to calculate terminal slope.
pdfNCA and rtfNCA support vector input for dur argument.
Four errata fixed.
SS option for steady-state added in txtNCA, pdfNCA and rtfNCA.
Problem with tbl_df in pdfNCA and rtfNCA function is fixed.
mayExcludeLast option added to pdfNCA, rtfNCA, txtNCA. This option works with NonCompart 0.4.9 or later.
Handles NA better with less error in the plot.
Some sentences are revised.
Argument key replaced key in rtfNCA and pdfNCA function.
Deprecated option in Sys.timezone(). is removed.
Calling twice for terminal slope is corrected.
Errata in manual corrected.
ncar to be compatible with NonCompart_0.3.3.
ncar A bug in C0 calcuation of IV bolus case was fixed.
ncar depends on NonCompart
ncar does not sort subject ID any more.
Various report functions like pdfNCA, rtfNCA, and txtNCA are added.
IndiNCA and NCA are deprecated.