Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我曾经geom_smooth(mehtod="lm")绘制线性回归。现在我想使用线性回归的系数和截距作为图表的标题。
geom_smooth(mehtod="lm")
我曾经Coeff <- coef(lm(Eo2005I ~ Eo2005P))找到我需要的值,但ggtitle似乎不喜欢c(Coeff["Eo2005P"],Coeff["Intercept"])文本的输入。我该怎么办?
Coeff <- coef(lm(Eo2005I ~ Eo2005P))
ggtitle
c(Coeff["Eo2005P"],Coeff["Intercept"])
尝试将各个元素“粘贴”coef在一起。
coef
coefftemp <- coef(lm(...)) Coeff <- paste(coefftemp[1],coefftemp[2])