0

I am trying to make a ROC graph I am new to R so this may be an easy question but, for some reason, it won't let me create this graph and keeps saying this

Setting levels: control = 0, case = 1

Setting direction: controls < cases 

Error in plot.new() : figure margins too large

I have installed the library(pROC) and have this code

probability = predict(logfit, AllTeamTotal, type = "response")

prediction[probability>0.5] = 1 table(prediction, AllTeamTotal$upset) 
ROC <- roc(AllTeamTotal$upset ~ prediction, plot = TRUE, print.auc = TRUE)
skinwizard
  • 11
  • 1
  • Try dragging your plotting window to make it larger and running the code again. You can also try `par(mar = c(0, 0, 0, 0))` and repeating the code – Allan Cameron Apr 10 '22 at 20:59
  • How are you using R? Command line, Rstudio, Mac, Windows, Linux? – Calimo Apr 11 '22 at 06:00
  • Does this answer your question? [Error in plot.new() : figure margins too large in R](https://stackoverflow.com/questions/12766166/error-in-plot-new-figure-margins-too-large-in-r) – Calimo Apr 11 '22 at 06:01

0 Answers0