predicted <- data.frame(sample = sample(10, 100, replace = TRUE),
label = rep(c("Healthy", "Cancer"), each = 50))
actual <- factor(rep(c("Healthy", "Cancer"), each = 5))
result1 <- ClassifyResult("Example", "Differential Expression", LETTERS[1:10], LETTERS[10:1], list(1:100, c(1:9, 11:101)), list(sample(10, 10), sample(10, 10)),
list(predicted), actual, list("fold", 100, 5))
predicted[, "label"] <- sample(predicted[, "label"])
result2 <- ClassifyResult("Example", "Differential Variability", LETTERS[1:10], LETTERS[10:1], list(1:100, c(1:5, 11:105)), list(sample(10, 10), sample(10, 10)),
list(predicted), actual, validation = list("leave", 1))
# rankPlot(list(result1, result2), pointTypeVariable = "classificationName") # Wait for namespace problems to be fixed.
Run the code above in your browser using DataLab