我正在嘗試獲取數值爲的估計值和Std。錯誤的摘要對象,但我正在訪問應用程序中錯誤的行(我認爲)。我怎樣才能解決這個問題?獲取彙總對象的行
require(MASS)
colnames(Cars93)
ll<-lm(Fuel.tank.capacity~Length*Passengers,data=Cars93)
s<-summary(ll)$coeff
apply(s,1,function(x){
paste(x[1]+3,x[2]+3) #trying to return intercept and length for each row
})
目標:
-8.18 17.93
0.11 0.09
.....
你在找'sprintf()'嗎?最終你想刪除名稱屬性。 – jogo