Running examples in ‘PKNCA-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: pknca_units_table
> ### Title: Create a unit assignment and conversion table
> ### Aliases: pknca_units_table
> 
> ### ** Examples
> 
> pknca_units_table() # only parameters that are unitless
    PPORRESU             PPTESTCD
1   unitless            r.squared
2   unitless        adj.r.squared
3   fraction                    f
4   fraction                  ptr
5   fraction                   fe
6   fraction           span.ratio
7          %             deg.fluc
8          %                swing
9          %       aucivpbextlast
10         %        aucivpbextall
11         %   aucivpbextint.last
12         %    aucivpbextint.all
13         %    aucivpbextinf.obs
14         %   aucivpbextinf.pred
15         %          aucpext.obs
16         %         aucpext.pred
17     count           count_conc
18     count        sparse_auc_df
19     count    lambda.z.n.points
20      <NA>                start
21      <NA>                  end
22      <NA>                 tmax
23      <NA>                tlast
24      <NA>               tfirst
25      <NA>             mrt.last
26      <NA>          mrt.iv.last
27      <NA>                 tlag
28      <NA>           time_above
29      <NA>            half.life
30      <NA>  lambda.z.time.first
31      <NA>       thalf.eff.last
32      <NA>    thalf.eff.iv.last
33      <NA>              mrt.obs
34      <NA>             mrt.pred
35      <NA>           mrt.iv.obs
36      <NA>          mrt.iv.pred
37      <NA>           mrt.md.obs
38      <NA>          mrt.md.pred
39      <NA>        thalf.eff.obs
40      <NA>       thalf.eff.pred
41      <NA>     thalf.eff.iv.obs
42      <NA>    thalf.eff.iv.pred
43      <NA>             lambda.z
44      <NA>             kel.last
45      <NA>          kel.iv.last
46      <NA>              kel.obs
47      <NA>             kel.pred
48      <NA>           kel.iv.obs
49      <NA>          kel.iv.pred
50      <NA>                   c0
51      <NA>                 cmax
52      <NA>                 cmin
53      <NA>            clast.obs
54      <NA>                  cav
55      <NA>         cav.int.last
56      <NA>          cav.int.all
57      <NA>              ctrough
58      <NA>               cstart
59      <NA>                 ceoi
60      <NA>           clast.pred
61      <NA>      cav.int.inf.obs
62      <NA>     cav.int.inf.pred
63      <NA>                   ae
64      <NA>              totdose
65      <NA>              cmax.dn
66      <NA>              cmin.dn
67      <NA>         clast.obs.dn
68      <NA>        clast.pred.dn
69      <NA>               cav.dn
70      <NA>           ctrough.dn
71      <NA>             vss.last
72      <NA>          vss.iv.last
73      <NA>               vz.obs
74      <NA>              vz.pred
75      <NA>              vss.obs
76      <NA>             vss.pred
77      <NA>           vss.iv.obs
78      <NA>          vss.iv.pred
79      <NA>           vss.md.obs
80      <NA>          vss.md.pred
81      <NA>              auclast
82      <NA>               aucall
83      <NA>          aucint.last
84      <NA>     aucint.last.dose
85      <NA>           aucint.all
86      <NA>      aucint.all.dose
87      <NA> aucabove.predose.all
88      <NA>  aucabove.trough.all
89      <NA>       sparse_auclast
90      <NA>        sparse_auc_se
91      <NA>            aucivlast
92      <NA>             aucivall
93      <NA>        aucivint.last
94      <NA>         aucivint.all
95      <NA>           aucinf.obs
96      <NA>          aucinf.pred
97      <NA>       aucint.inf.obs
98      <NA>  aucint.inf.obs.dose
99      <NA>      aucint.inf.pred
100     <NA> aucint.inf.pred.dose
101     <NA>         aucivinf.obs
102     <NA>        aucivinf.pred
103     <NA>             aumclast
104     <NA>              aumcall
105     <NA>          aumcinf.obs
106     <NA>         aumcinf.pred
107     <NA>           auclast.dn
108     <NA>            aucall.dn
109     <NA>        aucinf.obs.dn
110     <NA>       aucinf.pred.dn
111     <NA>          aumclast.dn
112     <NA>           aumcall.dn
113     <NA>       aumcinf.obs.dn
114     <NA>      aumcinf.pred.dn
115     <NA>              cl.last
116     <NA>               cl.all
117     <NA>               cl.obs
118     <NA>              cl.pred
119     <NA>             clr.last
120     <NA>              clr.obs
121     <NA>             clr.pred
> pknca_units_table(
+   concu="ng/mL", doseu="mg/kg", amountu="mg", timeu="hr"
+ )
                PPORRESU             PPTESTCD
1               unitless            r.squared
2               unitless        adj.r.squared
3               fraction                    f
4               fraction                  ptr
5               fraction                   fe
6               fraction           span.ratio
7                      %             deg.fluc
8                      %                swing
9                      %       aucivpbextlast
10                     %        aucivpbextall
11                     %   aucivpbextint.last
12                     %    aucivpbextint.all
13                     %    aucivpbextinf.obs
14                     %   aucivpbextinf.pred
15                     %          aucpext.obs
16                     %         aucpext.pred
17                 count           count_conc
18                 count        sparse_auc_df
19                 count    lambda.z.n.points
20                    hr                start
21                    hr                  end
22                    hr                 tmax
23                    hr                tlast
24                    hr               tfirst
25                    hr             mrt.last
26                    hr          mrt.iv.last
27                    hr                 tlag
28                    hr           time_above
29                    hr            half.life
30                    hr  lambda.z.time.first
31                    hr       thalf.eff.last
32                    hr    thalf.eff.iv.last
33                    hr              mrt.obs
34                    hr             mrt.pred
35                    hr           mrt.iv.obs
36                    hr          mrt.iv.pred
37                    hr           mrt.md.obs
38                    hr          mrt.md.pred
39                    hr        thalf.eff.obs
40                    hr       thalf.eff.pred
41                    hr     thalf.eff.iv.obs
42                    hr    thalf.eff.iv.pred
43                  1/hr             lambda.z
44                  1/hr             kel.last
45                  1/hr          kel.iv.last
46                  1/hr              kel.obs
47                  1/hr             kel.pred
48                  1/hr           kel.iv.obs
49                  1/hr          kel.iv.pred
50                 ng/mL                   c0
51                 ng/mL                 cmax
52                 ng/mL                 cmin
53                 ng/mL            clast.obs
54                 ng/mL                  cav
55                 ng/mL         cav.int.last
56                 ng/mL          cav.int.all
57                 ng/mL              ctrough
58                 ng/mL               cstart
59                 ng/mL                 ceoi
60                 ng/mL           clast.pred
61                 ng/mL      cav.int.inf.obs
62                 ng/mL     cav.int.inf.pred
63                    mg                   ae
64                 mg/kg              totdose
65       (ng/mL)/(mg/kg)              cmax.dn
66       (ng/mL)/(mg/kg)              cmin.dn
67       (ng/mL)/(mg/kg)         clast.obs.dn
68       (ng/mL)/(mg/kg)        clast.pred.dn
69       (ng/mL)/(mg/kg)               cav.dn
70       (ng/mL)/(mg/kg)           ctrough.dn
71       (mg/kg)/(ng/mL)             vss.last
72       (mg/kg)/(ng/mL)          vss.iv.last
73       (mg/kg)/(ng/mL)               vz.obs
74       (mg/kg)/(ng/mL)              vz.pred
75       (mg/kg)/(ng/mL)              vss.obs
76       (mg/kg)/(ng/mL)             vss.pred
77       (mg/kg)/(ng/mL)           vss.iv.obs
78       (mg/kg)/(ng/mL)          vss.iv.pred
79       (mg/kg)/(ng/mL)           vss.md.obs
80       (mg/kg)/(ng/mL)          vss.md.pred
81              hr*ng/mL              auclast
82              hr*ng/mL               aucall
83              hr*ng/mL          aucint.last
84              hr*ng/mL     aucint.last.dose
85              hr*ng/mL           aucint.all
86              hr*ng/mL      aucint.all.dose
87              hr*ng/mL aucabove.predose.all
88              hr*ng/mL  aucabove.trough.all
89              hr*ng/mL       sparse_auclast
90              hr*ng/mL        sparse_auc_se
91              hr*ng/mL            aucivlast
92              hr*ng/mL             aucivall
93              hr*ng/mL        aucivint.last
94              hr*ng/mL         aucivint.all
95              hr*ng/mL           aucinf.obs
96              hr*ng/mL          aucinf.pred
97              hr*ng/mL       aucint.inf.obs
98              hr*ng/mL  aucint.inf.obs.dose
99              hr*ng/mL      aucint.inf.pred
100             hr*ng/mL aucint.inf.pred.dose
101             hr*ng/mL         aucivinf.obs
102             hr*ng/mL        aucivinf.pred
103           hr^2*ng/mL             aumclast
104           hr^2*ng/mL              aumcall
105           hr^2*ng/mL          aumcinf.obs
106           hr^2*ng/mL         aumcinf.pred
107   (hr*ng/mL)/(mg/kg)           auclast.dn
108   (hr*ng/mL)/(mg/kg)            aucall.dn
109   (hr*ng/mL)/(mg/kg)        aucinf.obs.dn
110   (hr*ng/mL)/(mg/kg)       aucinf.pred.dn
111 (hr^2*ng/mL)/(mg/kg)          aumclast.dn
112 (hr^2*ng/mL)/(mg/kg)           aumcall.dn
113 (hr^2*ng/mL)/(mg/kg)       aumcinf.obs.dn
114 (hr^2*ng/mL)/(mg/kg)      aumcinf.pred.dn
115   (mg/kg)/(hr*ng/mL)              cl.last
116   (mg/kg)/(hr*ng/mL)               cl.all
117   (mg/kg)/(hr*ng/mL)               cl.obs
118   (mg/kg)/(hr*ng/mL)              cl.pred
119        mg/(hr*ng/mL)             clr.last
120        mg/(hr*ng/mL)              clr.obs
121        mg/(hr*ng/mL)             clr.pred
> pknca_units_table(
+   concu="ng/mL", doseu="mg/kg", amountu="mg", timeu="hr",
+   # Convert clearance and volume units to more understandable units with
+   # automatic unit conversion
+   conversions=data.frame(
+     PPORRESU=c("(mg/kg)/(hr*ng/mL)", "(mg/kg)/(ng/mL)"),
+     PPSTRESU=c("mL/hr/kg", "mL/kg")
+   )
+ )
Error in pknca_units_table(concu = "ng/mL", doseu = "mg/kg", amountu = "mg",  : 
  The units package is required for automatic unit conversion
Execution halted