ggmice
ggmice copied to clipboard
traceplot does not take 1 < number < all variables
library(mice)
library(ggmice)
imp <- mice(boys, m=2, maxit = 2, print=FALSE)
plot(imp, c("hgt", "wgt", "bmi"))
plot_trace(imp, c("hgt", "wgt", "bmi"))
#> Error in if (vrb %nin% varlist & vrb != "all") {: the condition has length > 1
Created on 2022-07-11 by the reprex package (v2.0.1)
I encountered the same problem. It could be fixed by simply changing:
Fixed in #80
library(mice)
#>
#> Attaching package: 'mice'
#> The following object is masked from 'package:stats':
#>
#> filter
#> The following objects are masked from 'package:base':
#>
#> cbind, rbind
library(ggmice)
#>
#> Attaching package: 'ggmice'
#> The following objects are masked from 'package:mice':
#>
#> bwplot, densityplot, stripplot, xyplot
imp <- mice(boys, m=2, maxit = 2, print=FALSE)
plot(imp, c("hgt", "wgt", "bmi"))
plot_trace(imp, c("hgt", "wgt", "bmi"))
Created on 2023-06-27 with reprex v2.0.2