R将绘制但不会绘制退位 [英] R will plot but won't draw abline

查看:91
本文介绍了R将绘制但不会绘制退位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

> head(returnee)
[1]  1.3936536 -0.6730667  2.3584725  2.3477308  3.2841443  1.3168157
> head(vixee)
[1] 14.75 15.45 17.59 17.74 17.75 18.35
> class(returnee)
[1] "numeric"
> class(vixee)
[1] "numeric"
> plot(returnee, vixee)
> abline(lm(returnee ~ vixee))

当我运行它时,它给出了情节,但是没有退位.有什么建议?谢谢.

When I run this, it gives the plot, but there is no abline. Any suggestions? Thanks.

推荐答案

应该为abline(lm(vixee ~ returnee)),以匹配绘图的坐标.

It should be abline(lm(vixee ~ returnee)) to match the coordinates of the plot.

这篇关于R将绘制但不会绘制退位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆