set.seed(1)
simulated <- data.frame(obs = factor(rep(letters[1:2], each = 100)),
perfect = sort(runif(200), decreasing = TRUE),
random = runif(200))
lift(obs ~ random, data = simulated)
lift(obs ~ random, data = simulated, type = c("p", "l"))
lift(obs ~ random + perfect, data = simulated,
type = c("p", "l"),
auto.key = list(columns = 2))
Run the code above in your browser using DataLab