.
shape-, dbf. , foreign, dbf. data:
library(foreign)samplename = "D:\\Work\\profile.dbf"data = read.dbf(samplename), intercept slope:
intercepts = numeric()slopes = numeric(), ( 5) :
numbands=5for (i in 1:numbands) { model = lm(data[,i+numbands]~data[,i]) intercept = model$coefficients[1] intercepts = cbind(intercepts,intercept) slope = model$coefficients[2] slopes = cbind(slopes,slope)}.
res = rbind(intercepts,slopes)write.table(res,file=outputfile,sep=",",row.names=F,col.names=F), , , . , , R.
-
. 41
. . , , , . .* (, , ). . - . + , . . , (, , ). . , , . , , . , .
: , , . . - . . .
*( , , . .
.
. .)