1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| MakeData=function(data,Winsiz,name){ X_skew=sk(data$X,Winsiz) X_kurt=ku(data$X,Winsiz) X_rms=rm(data$X,Winsiz) X_p2p=p2p(data$X,Winsiz) X_iq=iq(data$X,Winsiz) X_cf=cf(data$X,Winsiz) Y_skew=sk(data$Y,Winsiz) Y_kurt=ku(data$Y,Winsiz) Y_rms=rm(data$Y,Winsiz) Y_p2p=p2p(data$Y,Winsiz) Y_iq=iq(data$Y,Winsiz) Y_cf=cf(data$Y,Winsiz) Z_skew=sk(data$Z,Winsiz) Z_kurt=ku(data$Z,Winsiz) Z_rms=rm(data$Z,Winsiz) Z_p2p=p2p(data$Z,Winsiz) Z_iq=iq(data$Z,Winsiz) Z_cf=cf(data$Z,Winsiz) all=cbind(X_skew,X_kurt,X_rms,X_p2p,X_iq,X_cf,Y_skew,Y_kurt,Y_rms,Y_p2p,Y_iq,Y_cf,Z_skew,Z_kurt,Z_rms,Z_p2p,Z_iq,Z_cf) options(max.print=10000000) print("Im writing now") write.table(all[,1:18],name,sep='\t',row.names=F) return(all) }
|