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

> ### Name: estimate.wqs
> ### Title: Weighted Quantile Sum (WQS) Regression
> ### Aliases: estimate.wqs
> ### Keywords: imputation wqs
> 
> ### ** Examples
> 
> # Example 1: Binary outcome using the example simulated dataset in this package.
> data(simdata87)
> set.seed(23456)
> W.bin4  <- estimate.wqs(
+   y = simdata87$y.scenario, X = simdata87$X.true[, 1:9],
+   B = 10, family = "binomial",
+   verbose = TRUE
+ )
## Outcome Summary 
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.000   0.000   0.000   0.457   1.000   1.000 
## Classes: 
           y            X            Z 
   "integer" "data.frame"       "NULL" 
X 
 alpha.chlordane        dieldrin         gamma.chlordane     lindane      
 Min.   :0.000e+00   Min.   :    0.111   Min.   : 13.51   Min.   : 3.513  
 1st Qu.:1.110e+01   1st Qu.:   14.344   1st Qu.: 36.68   1st Qu.:11.163  
 Median :1.254e+02   Median :   52.536   Median : 46.35   Median :14.981  
 Mean   :4.410e+04   Mean   :  433.116   Mean   : 49.35   Mean   :17.174  
 3rd Qu.:1.682e+03   3rd Qu.:  218.957   3rd Qu.: 58.91   3rd Qu.:21.129  
 Max.   :1.735e+07   Max.   :48673.296   Max.   :139.34   Max.   :75.360  
  methoxychlor         dde                 ddt          pentachlorophenol
 Min.   : 17.30   Min.   :     0.02   Min.   :  1.382   Min.   :  1.615  
 1st Qu.: 55.83   1st Qu.:    13.69   1st Qu.:  7.307   1st Qu.:  8.390  
 Median : 75.17   Median :    84.22   Median : 12.290   Median : 14.651  
 Mean   : 83.29   Mean   :  2546.60   Mean   : 16.119   Mean   : 20.251  
 3rd Qu.:101.89   3rd Qu.:   529.84   3rd Qu.: 19.398   3rd Qu.: 23.942  
 Max.   :316.07   Max.   :383567.39   Max.   :178.854   Max.   :285.229  
    pcb_105       
 Min.   :  0.109  
 1st Qu.:  3.317  
 Median :  7.458  
 Mean   : 16.473  
 3rd Qu.: 17.779  
 Max.   :400.360  
y 
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.000   0.000   0.000   0.457   1.000   1.000 
Z 
Length  Class   Mode 
     0   NULL   NULL 
## Place BDLs in Q1?  FALSE 
#> No missing values in matrix detected. Regular quantiles computed.
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 
  'partial' index 1001 outside bounds
Calls: estimate.wqs ... quantile.default -> sort -> sort.default -> sort.int
Execution halted