Displaying 1 result from an estimated 1 matches for "r2ofr2".
Did you mean:
2of2
2012 Apr 01
1
indexing in a function doesn't work?
...lm)
}
plot.cor<-function(x){
temp<-a+1
lengthx<-c(1:temp)
plot(x~c(1:temp))
m2<-lm(x~c(1:temp))
abline(m2)
n<-summary(m2)$adj.r.squared
legend("bottomright", legend=signif(n), col="black")
slope<-(coef(m2)[2])# slope
values<-(num)#values for aic or adj r2
r2ofr2<-(n) #r2 of r2 or AIC
output<-data.frame(lengthx,slope,values,r2ofr2)
}
plot.cor(num)
write.csv(plot.cor(num)$output,"output.csv") # can't seem to use
paste(substitute(form3),".csv",sep="") to name it at the moment
par(mfrow=c(1,1))
}
Ben
[[alternative HT...