The unit test code provided below leads to the following error: no applicable method for 'rename_' applied to an object of class "list"
If a second case is present in the data, the error does not occur.
test_that("blob plot for visualizing ranking stability by algorithm returns one plot if #algorithms < #tasks", { dataTask1 <- cbind(task="T1", rbind( data.frame(algo="A1", value=0.8, case="C1"), data.frame(algo="A2", value=0.6, case="C1") )) dataTask2 <- cbind(task="T2", rbind( data.frame(algo="A1", value=0.2, case="C1"), data.frame(algo="A2", value=0.3, case="C1") )) dataTask3 <- cbind(task="T3", rbind( data.frame(algo="A1", value=0.1, case="C1"), data.frame(algo="A2", value=0.8, case="C1") )) data <- rbind(dataTask1, dataTask2, dataTask3) challenge <- as.challenge(data, by="task", algorithm="algo", case="case", value="value", smallBetter=FALSE) ranking <- challenge%>%aggregateThenRank(FUN=median, ties.method="min") set.seed(1) rankingBootstrapped <- ranking%>%bootstrap(nboot=10) meanRanks <- ranking%>%consensus(method = "euclidean") actualPlot <- stabilityByAlgorithm(rankingBootstrapped, ordering = names(meanRanks), single = FALSE) expect_is(actualPlot, "ggplot") })