## Get Data for comparison
data("card")
south <- card[card$south==1,]
north <- card[card$south==0,]
black <- card[card$black==1,]
white <- card[card$black==0,]
## use the function to plot the data
univar_data<-sampcompR::uni_compare(dfs = c("north","white"),
benchmarks = c("south","black"),
variables= c("age","educ","fatheduc","motheduc","wage","IQ"),
funct = "abs_rel_mean",
nboots=0,
summetric="rmse2",
data=TRUE)
sampcompR::plot_uni_compare(univar_data)
Run the code above in your browser using DataLab