Running examples in 'RItools-Ex.R' failed
The error most likely occurred in:

> ### Name: print.xbal
> ### Title: Printing xBalance and balanceTest Objects
> ### Aliases: print.xbal print print.balancetest
> ### Keywords: print
> 
> ### ** Examples
> 
> data(nuclearplants)
> 
> 
> xb1 <- balanceTest(pr ~ date + t1 + t2 + cap + ne + ct + bw + cum.n + strata(pt),
+          data = nuclearplants)
> 
> print(xb1)
      strata():        --                                          
      stat      Treatment Control adj.diff std.diff    z           
vars                                                               
date              68.5    68.6     -0.118   -0.11   -0.31          
t1                14.0    13.6      0.364    0.10    0.28          
t2                69.1    59.3      9.78     0.99    2.47          
cap               870     805       64.6     0.35    0.89          
ne                0.200   0.273    -0.0727  -0.17   -0.43          
ct                0.300   0.455    -0.155   -0.31   -0.81          
bw                0.200   0.182    0.0182    0.04    0.12          
cum.n             8.10    8.73     -0.627   -0.10   -0.26          
---Overall Test---
   chisquare df p.value
--      11.5  8   0.177
---
Signif. codes:  0 '***' 0.001 '** ' 0.01 '*  ' 0.05 '.  ' 0.1 '   ' 1 
> 
> print(xb1, show.pvals = TRUE)
      strata():        --                                          
      stat      Treatment Control adj.diff std.diff       z       p
vars                                                               
date              68.5    68.6     -0.118   -0.11   -0.31   1.000  
t1                14.0    13.6      0.364    0.10    0.28   1.000  
t2                69.1    59.3      9.78     0.99    2.47   0.109  
cap               870     805       64.6     0.35    0.89   1.000  
ne                0.200   0.273    -0.0727  -0.17   -0.43   1.000  
ct                0.300   0.455    -0.155   -0.31   -0.81   1.000  
bw                0.200   0.182    0.0182    0.04    0.12   1.000  
cum.n             8.10    8.73     -0.627   -0.10   -0.26   1.000  
---Overall Test---
   chisquare df p.value
--      11.5  8   0.177
> 
> print(xb1, horizontal = FALSE)
$`--`
      Treatment Control adj.diff std.diff     z sig.
date       68.5    68.6   -0.118    -0.11 -0.31     
t1         14.0    13.6    0.364     0.10  0.28     
t2         69.1    59.3     9.78     0.99  2.47     
cap         870     805     64.6     0.35  0.89     
ne        0.200   0.273  -0.0727    -0.17 -0.43     
ct        0.300   0.455   -0.155    -0.31 -0.81     
bw        0.200   0.182   0.0182     0.04  0.12     
cum.n      8.10    8.73   -0.627    -0.10 -0.26     

---Overall Test---
   chisquare df p.value
--      11.5  8   0.177
---
Signif. codes:  0 '***' 0.001 '** ' 0.01 '*  ' 0.05 '.  ' 0.1 '   ' 1 
> 
> ## The following doesn't work yet.
> ## Not run: 
> ##D print(xb1, which.vars=c("date","t1"),
> ##D          which.stats=c("adj.means","z.scores","p.values"))
> ## End(Not run)
> 
> ## The following example prints the adjusted means
> ## labeled as "treatmentvar=0" and "treatmentvar=1" using the
> ## formula provided to xBalance().
> 
> # This is erroring with the change to devtools, FIXME
> ## Not run: 
> ##D print(xb1,
> ##D       which.vars = c("date", "t1"),
> ##D       which.stats = c("pr=0", "pr=1", "z", "p"))
> ## End(Not run)
> 
> ## Only printing out a specific stratification factor
> xb2 <- balanceTest(pr~ date + t1 + t2 + cap + ne + ct + bw + cum.n + strata(pt),
+          data = nuclearplants)
> 
> print(xb2, which.strata = "pt")
Error in x$results[vars, stats, strata, drop = F] : 
  subscript out of bounds
Calls: print ... tryCatch -> tryCatchList -> fun -> subset -> subset.xbal
Execution halted