data(diamonds, package = "ggplot2")
set.seed(42)
idx <- sample(nrow(diamonds), 1e4)
mid <- interpret(price ~ (carat + cut + color + clarity)^2, diamonds[idx, ])
imp <- mid.importance(mid)
# Create a bar plot (default)
plot(imp)
# Create a dot chart
plot(imp, type = "dotchart", theme = "Okabe-Ito", size = 1.5)
# Create a heatmap
plot(imp, type = "heatmap")
# Create a boxplot to see the distribution of effects
plot(imp, type = "boxplot")
Run the code above in your browser using DataLab