Reputation: 123
I am trying to use geom_roc() on my R, but nothing is plotting. There is no error messages, and the grid of the ROC curve is shows up, but I don't see any graph on the grid. Could you tell me how to fix this problem? Thank you,
library(ggplot2)
library(plotROC)
df1 <- data.frame(read.csv(file="DogData.csv", header=TRUE, sep=","))
df1
df1$Status.Cancer <- as.factor(df1$Status.Cancer)
df1$Status.SIRS <- as.factor(df1$Status.SIRS)
df1$Status.Sepsis <- as.factor(df1$Status.Sepsis)
ggplot(df1, aes(d = Status.Cancer, m = AGE)) + geom_roc()
Upvotes: 1
Views: 1042
Reputation: 123
I just fixed the problem. The problem was that Status.Cancer wasn't specified as numeric column. Change the column into numeric type and everything works just fine.
Upvotes: 1