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

> ### Name: method_user
> ### Title: User-Defined Functions for Estimating Weights
> ### Aliases: method_user
> 
> ### ** Examples
> 
> 
> library("cobalt")
 cobalt (Version 4.3.1, Build Date: 2021-03-30 09:50:18 UTC)
> data("lalonde", package = "cobalt")
> 
> #A user-defined version of method = "ps"
> my.ps <- function(treat, covs, estimand, focal = NULL) {
+   covs <- make_full_rank(covs)
+   d <- data.frame(treat, covs)
+   f <- formula(d)
+   ps <- glm(f, data = d, family = "binomial")$fitted
+   w <- get_w_from_ps(ps, treat = treat, estimand = estimand,
+                      focal = focal)
+ 
+   return(list(w = w, ps = ps))
+ }
> 
> #Balancing covariates between treatment groups (binary)
> (W1 <- weightit(treat ~ age + educ + married +
+                   nodegree + re74, data = lalonde,
+                 method = my.ps, estimand = "ATT"))
Warning: The following arguments were specified but are not suitable arguments to the provided function:
	treat.type, .data, and .covs
A weightit object
 - method: "my.ps" (a user-defined method)
 - number of obs.: 614
 - sampling weights: none
 - treatment: 2-category
 - estimand: ATT (focal: 1)
 - covariates: age, educ, married, nodegree, re74
> summary(W1)
                 Summary of weights

- Weight ranges:

           Min                                  Max
treated 1.0000               ||              1.0000
control 0.0222 |---------------------------| 2.0438

- Units with 5 greatest weights by group:
                                           
              7      5      4      3      1
 treated      1      1      1      1      1
            411    595    269    409    296
 control 1.3303 1.4365 1.5005 1.6369 2.0438

- Weight statistics:

        Coef of Var   MAD Entropy # Zeros
treated       0.000 0.000   -0.00       0
control       0.823 0.701    0.33       0

- Effective Sample Sizes:

           Control Treated
Unweighted  429.       185
Weighted    255.99     185
> bal.tab(W1)
Call
 weightit(formula = treat ~ age + educ + married + nodegree + 
    re74, data = lalonde, method = my.ps, estimand = "ATT")

Balance Measures
               Type Diff.Adj
prop.score Distance   0.0199
age         Contin.   0.0459
educ        Contin.  -0.0360
married      Binary   0.0044
nodegree     Binary   0.0080
re74        Contin.  -0.0275

Effective sample sizes
           Control Treated
Unadjusted  429.       185
Adjusted    255.99     185
> 
> #Balancing covariates for longitudinal treatments
> # my.ps is used at each time point.
> library("twang")
Error in library("twang") : there is no package called 'twang'
Execution halted