Chapter 3 패키지: ncar
보고서를 만드는 패키지입니다. 현재 설정된 working directory에 결과 파일이 생성됩니다.
3.1 txtNCA()
txtNCA()를 통해서 다음 결과를 얻을 수 있습니다.
txtNCA(Theoph[Theoph$Subject=="1","Time"],
Theoph[Theoph$Subject=="1","conc"],
dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h")
## [1] " NONCOMPARTMENTAL ANALYSIS REPORT"
## [2] " Package version 0.4.1 (2018-06-20 KST)"
## [3] " R version 3.5.2 (2018-12-20)"
## [4] ""
## [5] "Date and Time: 2019-03-04 13:30:07 Asia/Seoul"
## [6] ""
## [7] "Calculation Setting"
## [8] "-------------------"
## [9] "Drug Administration: Extravascular"
## [10] "Observation count excluding trailing zero: 11"
## [11] "Dose at time 0: 320 mg"
## [12] "AUC Calculation Method: Linear-up Linear-down"
## [13] "Weighting for lambda z: Uniform (Ordinary Least Square, OLS)"
## [14] "Lambda z selection criterion: Heighest adjusted R-squared value with precision=1e-4"
## [15] ""
## [16] ""
## [17] "Fitting, AUC, AUMC Result"
## [18] "-------------------------"
## [19] " Time Conc. Pred. Residual AUC AUMC"
## [20] "---------------------------------------------------------------------"
## [21] " 0.0000 0.7400 0.0000 0.0000"
## [22] " 0.2500 2.8400 0.4475 0.0888"
## [23] " 0.5700 6.5700 1.9531 0.8015"
## [24] " 1.1200 10.5000 6.6474 5.0654"
## [25] " 2.0200 9.6600 15.7194 19.1383"
## [26] " 3.8200 8.5800 32.1354 66.1982"
## [27] " 5.1000 8.3600 42.9769 114.4617"
## [28] " 7.0300 7.4700 58.2529 206.2815"
## [29] " 9.0500 * 6.8900 6.8912 -1.228e-03 72.7565 322.2988"
## [30] " 12.1200 * 5.9400 5.9387 +1.324e-03 92.4505 528.5219"
## [31] " 24.3700 * 3.2800 3.2801 -1.465e-04 148.9231 1459.0711"
## [32] ""
## [33] "*: Used for the calculation of Lambda z."
## [34] ""
## [35] ""
## [36] "Calculated Values"
## [37] "-----------------"
## [38] "CMAX Max Conc 10.5000 mg/L"
## [39] "CMAXD Max Conc Norm by Dose 0.0328 mg/L/mg"
## [40] "TMAX Time of CMAX 1.1200 h"
## [41] "TLAG Time Until First Nonzero Conc 0.0000 h"
## [42] "CLST Last Nonzero Conc 3.2800 mg/L"
## [43] "CLSTP Last Nonzero Conc Pred 3.2801 mg/L"
## [44] "TLST Time of Last Nonzero Conc 24.3700 h"
## [45] "LAMZHL Half-Life Lambda z 14.3044 h"
## [46] "LAMZ Lambda z 0.0485 /h"
## [47] "LAMZLL Lambda z Lower Limit 9.0500 h"
## [48] "LAMZUL Lambda z Upper Limit 24.3700 h"
## [49] "LAMZNPT Number of Points for Lambda z 3"
## [50] "CORRXY Correlation Between TimeX and Log ConcY -1.0000 "
## [51] "R2 R Squared 1.0000 "
## [52] "R2ADJ R Squared Adjusted 1.0000 "
## [53] "AUCLST AUC to Last Nonzero Conc 148.9231 h*mg/L"
## [54] "AUCALL AUC All 148.9231 h*mg/L"
## [55] "AUCIFO AUC Infinity Obs 216.6119 h*mg/L"
## [56] "AUCIFOD AUC Infinity Obs Norm by Dose 0.6769 h*mg/L/mg"
## [57] "AUCIFP AUC Infinity Pred 216.6150 h*mg/L"
## [58] "AUCIFPD AUC Infinity Pred Norm by Dose 0.6769 h*mg/L/mg"
## [59] "AUCPEO AUC %Extrapolation Obs 31.2489 %"
## [60] "AUCPEP AUC %Extrapolation Pred 31.2499 %"
## [61] "AUMCLST AUMC to Last Nonzero Conc 1459.0711 h2*mg/L"
## [62] "AUMCIFO AUMC Infinity Obs 4505.5348 h2*mg/L"
## [63] "AUMCIFP AUMC Infinity Pred 4505.6709 h2*mg/L"
## [64] "AUMCPEO AUMC %Extrapolation Obs 67.6160 %"
## [65] "AUMCPEP AUMC % Extrapolation Pred 67.6170 %"
## [66] "VZFO Vz Obs by F 30.4867 L"
## [67] "VZFP Vz Pred by F 30.4863 L"
## [68] "CLFO Total CL Obs by F 1.4773 L/h"
## [69] "CLFP Total CL Pred by F 1.4773 L/h"
## [70] "MRTEVLST MRT Extravasc to Last Nonzero Conc 9.7975 h"
## [71] "MRTEVIFO MRT Extravasc Infinity Obs 20.8000 h"
## [72] "MRTEVIFP MRT Extravasc Infinity Pred 20.8004 h"
파일로 저장하려면 다음을 입력합니다.
writeLines(txtNCA(Theoph[Theoph$Subject=="1","Time"],
Theoph[Theoph$Subject=="1","conc"],
dose=320, doseUnit="mg", concUnit="mg/L",
timeUnit="h"),
'Output-ncar/txtNCA-Theoph.txt')
3.2 pdfNCA()
pdfNCA()로 pdf로 결과를 볼 수 있습니다. (Figure 3.1)
ncar::pdfNCA(fileName="Output-ncar/pdfNCA-Theoph.pdf", Theoph, key="Subject",
colTime="Time", colConc="conc", dose=320, doseUnit="mg",
timeUnit="h", concUnit="mg/L")
## png
## 2
3.3 rtfNCA()
마이크로소프트 워드에서 편집가능한 rtf파일을 만듭니다.
ncar::rtfNCA(fileName="rtfNCA-Theoph.rtf", Theoph, key="Subject",
colTime="Time", colConc="conc", dose=320, doseUnit="mg",
timeUnit="h", concUnit="mg/L")