can i convert a base plot in r to a ggplot object?
问题 I'm somewhat new to R and I love ggplot - that's all I use for plotting, so I don't know all the archaic syntax needed for base plots in R (and I'd rather not have learn it). I'm running pROC::roc and I would like to plot the output in ggplot (so I can fine tune how it looks). I can immediately get a plot as follows: size <- 100 response <- sample(c(0,1), replace=TRUE, size=size) predictor <- rnorm(100) rocobject <- pROC::roc(response, predictor,smooth=T) plot(rocobject) To use ggplot instead