******Friedman's SuperSmoother******* aloha<-read.csv("profile.csv", header=T) t1<-supsmu(aloha$age, aloha$profile, aloha$sample, span ="cv") t2<-supsmu(aloha$age, aloha$profile, aloha$sample, span ="0.05") t3<-supsmu(aloha$age, aloha$profile, aloha$sample, span ="0.08") t4<-supsmu(aloha$age, aloha$profile, aloha$sample, span ="0.10") t1x<-t1$x t1y<-t1$y t2y<-t2$y t3y<-t3$y t4y<-t4$y z=matrix(c(t1x,t1$y,t2$y,t3$y,t4$y),ncol= 5) write.csv(z,"smoothed_profile.xls")