fit <- lm(Sepal.Length ~ ., data = iris)
fl <- flashlight(model = fit, label = "iris", data = iris, y = "Sepal.Length")
plot(light_profile2d(fl, v = c("Petal.Length", "Species")))
pr <- light_profile2d(fl, v = c("Petal.Length", "Sepal.Width"),
type = "predicted", by = "Species", n_bins=c(2, 3), sep = ";")
plot(pr)
Run the code above in your browser using DataLab