2015年09月26日

来源:互联网 发布:开淘宝店要考试吗 编辑:程序博客网 时间:2024/04/27 08:16
Veg <- read.table(file = "Vegetation2.txt",header = T)

plot(x=Veg$BARESOIL,y=Veg$R,xlim = c(0,45),ylim = c(4,19))

M.Loess <- loess(R~BARESOIL,data = Veg)                    #对数据进行计算,Loess平滑

FIT <- fitted(M.Loess)                                                            #拟合
Ord1 <- order(Veg$BARESOIL)

lines(Veg$BARESOIL[Ord1],FIT[Ord1],lwd=3,lty=2,col=14)     #在图上添线

 
0 0