love.plot() uses ggplot from the ggplot2 package, and (invisibly) returns a "ggplot" object. This means that users can edit aspects of the plot using ggplot2 syntax.The default in love.plot() is to present variables as they are named in the output of the call to bal.tab(), so it is important to know this output before specifying alternate variable names when using var.names, as the displayed variable names may differ from those in the original data. Note that if drop.distance = TRUE, which the default, the distance measure, if any, will not count as a variable below; otherwise, it will count.
There are several ways to specify alternate names for presentation in the displayed plot using the var.names argument. You can use a vector of alternate names the same length as the variable list output from bal.tab(), and love.plot() will use these names instead. To leave a variable name as is, enter "" or NA in the position of that variable. Another way is to specify a list of old and new variable names, pairing the old name with the new name. You can do this in three ways: 1) use a vector of new variable names, with the names of the values the old variable names; 2) use a data frame with exactly one column containing the new variable names and the row names containing the old variable names; or 3) use a data frame with two columns, the first containing the old variable names and the second containing the new variable names. This third method is the safest because the coersion rules in R are least likely to affect the input. If a variable in the output from bal.tab() is not provided in the list of old variable names, love.plot() will use the original old variable name.
There are two ways to use love.plot() with clusters, and in both, the cluster argument must be specified in the call to bal.tab(). First, one can display a plot for balance in a single cluster; to do this, the call to bal.tab() must have which.cluster specified, and the argument therein must refer to a single cluster either by name or index. Second, one can display a plot summarizing balance across clusters; to do this, which.cluster in bal.tab() should be empty, NULL, or NA, and an argument should be given to cluster.fun in love.plot() referring to whether the mean, median, or maximum ("max") balance statistic or range ("range") of balance statistics for each covariate across clusters should be presented in the plot. In order to use "range", quick in bal.tab() must be set to FALSE, because setting it to TRUE suppresses calculation of non-displayed values, and the minimum statistic across clusters, required for displaying the range, is not normally displayed.