ngreifer / cobalt

Covariate Balance Tables and Plots - An R package for assessing covariate balance
https://ngreifer.github.io/cobalt/
70 stars 11 forks source link

Conflict between cobalt and caret packages #77

Closed BorgeJorge closed 5 months ago

BorgeJorge commented 6 months ago

If the caret package is loaded, bal.tab() with the cluster option will fail. For example,

library(cobalt)
library(caret)
bal.tab(vs ~ mpg, data = mtcars, cluster = "am")

Error in UseMethod("as.cluster") : 
  no applicable method for 'as.cluster' applied to an object of class "data.frame"
ngreifer commented 6 months ago

Thank you so much, I figured out the issue and will fix it shortly.