smd(mtcars$mpg, mtcars$am)
smd(mtcars$mpg, mtcars$am, "all")
smd(mtcars$mpg, mtcars$am, "1")
smd(mtcars$mpg, mtcars$am, "2")
smd(mtcars$hp, mtcars$vs)
d <- data.table::as.data.table(mtcars)
d[, smd(mpg, vs)]
rm(d)
Run the code above in your browser using DataLab