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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: modav
> ### Title: Treatment effect estimation using model averaging based on
> ###   marginal models.
> ### Aliases: modav
> ### Keywords: models
> 
> ### ** Examples
> 
> ## toy example calls using the simulated datnorm data-set without
> ## treatment and subgroup effect, see ?datnorm for details
> data(datnorm)
> head(datnorm)
           y treat   height  labvalue region smoker           x1         x2
1 -1.0202189     0 173.2837 0.2514877     US      0  0.462476508 -0.0470168
2 -0.2119981     1 171.9331 0.5802000     EU      1 -0.970432643  0.2837053
3 -1.5903534     1 166.5654 1.8176434     US      1  0.755259150 -1.8705144
4 -0.8839219     1 171.9361 2.9461580     EU      1  0.009543805  1.1998671
5 -0.4727521     1 175.3818 3.2515791  Japan      0 -1.100804732 -0.1133305
6  0.2521422     1 171.7361 0.9904963     EU      1 -0.098999537  1.1640513
> 
> ## first need to create candidate subgroups (if not already defined in data-set)
> ## here generate candidate subgroups manually (need to be numeric 0-1 variables)
> groups <- data.frame(labvalL.5=as.numeric(datnorm$labvalue < 0.5),
+                      regUS=as.numeric(datnorm$region == "US"),
+                      hgtL175=as.numeric(datnorm$height < 175))
> fitdat <- cbind(datnorm, groups) # bind subgroup variables to main data
> ## subgroups of interest
> subgr <- c("labvalL.5", "regUS", "hgtL175")
> res <- modav(resp = "y", trt = "treat", subgr = subgr, data = fitdat, 
+              covars = ~ x1 + x2, fitfunc = "lm")
> summary(res)
      Group     Subset GroupSize           LB    trtEff        UB post.mod.prob
1 labvalL.5   Subgroup        46  0.036819315 0.4115539 0.9201322     0.3745109
2 labvalL.5 Complement        54 -0.185061335 0.2844184 0.6530808     0.3745109
3     regUS   Subgroup        28 -0.285895882 0.3054576 0.7341503     0.4680197
4     regUS Complement        72  0.015972293 0.3660317 0.7352262     0.4680197
5   hgtL175   Subgroup        58 -0.013356754 0.3326948 0.6734927     0.1574694
6   hgtL175 Complement        42  0.007061331 0.3599826 0.7182534     0.1574694
7   overall    overall       100  0.015681670 0.3388221 0.6619625     0.0000000
> plot(res, show.compl=TRUE)
Error in Summary.unit(c(4.4, 4.4), na.rm = FALSE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... render_strips -> build_strip -> ggstrip -> Summary.unit
Execution halted