R语言:绘制散点图时出现报错Don't know how to automatically pick scale for object of type <data.frame>. Defaulting to continuous.
Discrete value supplied to continuous scale
#预测分析
lm.predict=predict(ins_model,data,interval="prediction",level=0.95)
lm.predict=as.data.frame(lm.predict);lm.predict
class(lm.predict)
data$pred=lm.predict
pred=data$pred
data$pred.fit=as.data.frame(pred$fit);data$pred.fit
class(data$pred.fit)
data
#绘制散点图
library(ggplot2)
ggplot(data,aes(x=expenses,y=pred.fit))
data$pred.fit是有值的。也尝试过当data$pred.fit为numeric时绘制散点图,没有出现报错,但结果图中没有点,是空白的。
你把报错发给我吧