R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(100 + ,102 + ,103.65 + ,104.974 + ,104.641 + ,104.902 + ,105.695 + ,106.489 + ,107.146 + ,107.695 + ,107.711 + ,108.313 + ,108.124 + ,109.615 + ,111.34 + ,110.717 + ,111.217 + ,111.452 + ,111.611 + ,111.717 + ,112.062 + ,112.842 + ,113.241 + ,113.015 + ,113.998 + ,114.936 + ,114.245 + ,114.437 + ,115.286 + ,116.071 + ,117.807 + ,118.255 + ,118.969 + ,120.333 + ,121.998 + ,123.239 + ,124.666 + ,126.54 + ,127.336 + ,127.871 + ,130.115 + ,132.773 + ,134.265 + ,134.596 + ,134.38 + ,135.121 + ,135.136 + ,135.336 + ,135.284 + ,137.144 + ,140.349 + ,143.264 + ,144.381 + ,145.881 + ,146.497 + ,148.857 + ,150.78 + ,153.293 + ,157.641 + ,162.182 + ,167.86 + ,175.245 + ,179.32 + ,184.979 + ,188.482 + ,192.86 + ,195.475 + ,198.4 + ,200.598 + ,202.121 + ,205.875 + ,207.085 + ,209.204 + ,212.246 + ,215.466 + ,216.693 + ,219.019 + ,217.924 + ,217.978 + ,218.186 + ,218.54 + ,217.886 + ,216.347 + ,219.825 + ,221.956 + ,227.184 + ,229.247 + ,233.33 + ,236.987 + ,240.027 + ,245.433 + ,246.641 + ,250.328 + ,250.849 + ,251.435 + ,252.091 + ,252.946 + ,252.773 + ,250.677 + ,250.105 + ,251.788 + ,250.212 + ,248.073 + ,244.468 + ,244.727 + ,244.034 + ,243.588 + ,236.447 + ,224.906 + ,221.934 + ,224.903 + ,223.798 + ,218.529 + ,217.521 + ,219.971 + ,223.841 + ,223.764 + ,223.664 + ,217.678 + ,218.478 + ,214.815 + ,215.143 + ,218.381 + ,219.962 + ,218.933 + ,218.36 + ,217.72 + ,219.934 + ,220.842 + ,220.584 + ,216.346 + ,220.221 + ,222.182 + ,225.455 + ,226.42 + ,228.287 + ,231.349 + ,231.015 + ,232.241 + ,233.688 + ,236.667 + ,238.439 + ,239.488 + ,238.741 + ,238.5 + ,242.116 + ,243.923 + ,245.813 + ,247.143 + ,246.381) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/fisher/rcomp/tmp/15mbu1353366151.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x,type='l',main='Run Sequence Plot',xlab='time or index',ylab='value') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/2xdp11353366151.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(x) > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/3hzbm1353366151.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if (par1 > 0) + { + densityplot(~x,col='black',main=paste('Density Plot bw = ',par1),bw=par1) + } else { + densityplot(~x,col='black',main='Density Plot') + } > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/4617r1353366151.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(x) > qqline(x) > grid() > dev.off() null device 1 > if (par2 > 0) + { + postscript(file="/var/fisher/rcomp/tmp/5la1r1353366151.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + dum <- cbind(lag(x,k=1),x) + dum + dum1 <- dum[2:length(x),] + dum1 + z <- as.data.frame(dum1) + z + plot(z,main='Lag plot (k=1), lowess, and regression line') + lines(lowess(z)) + abline(lm(z)) + dev.off() + if (par2 > 1) { + postscript(file="/var/fisher/rcomp/tmp/6rnmq1353366151.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + dum <- cbind(lag(x,k=par2),x) + dum + dum1 <- dum[(par2+1):length(x),] + dum1 + z <- as.data.frame(dum1) + z + mylagtitle <- 'Lag plot (k=' + mylagtitle <- paste(mylagtitle,par2,sep='') + mylagtitle <- paste(mylagtitle,'), and lowess',sep='') + plot(z,main=mylagtitle) + lines(lowess(z)) + dev.off() + } + postscript(file="/var/fisher/rcomp/tmp/7643f1353366151.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + acf(x,lag.max=par2,main='Autocorrelation Function') + grid() + dev.off() + } null device 1 > summary(x) Min. 1st Qu. Median Mean 3rd Qu. Max. 100.0 126.7 215.0 184.2 227.0 252.9 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Descriptive Statistics',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'# observations',header=TRUE) > a<-table.element(a,length(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'minimum',header=TRUE) > a<-table.element(a,min(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Q1',header=TRUE) > a<-table.element(a,quantile(x,0.25)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'median',header=TRUE) > a<-table.element(a,median(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'mean',header=TRUE) > a<-table.element(a,mean(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Q3',header=TRUE) > a<-table.element(a,quantile(x,0.75)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'maximum',header=TRUE) > a<-table.element(a,max(x)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/8er6m1353366152.tab") > > try(system("convert tmp/15mbu1353366151.ps tmp/15mbu1353366151.png",intern=TRUE)) character(0) > try(system("convert tmp/2xdp11353366151.ps tmp/2xdp11353366151.png",intern=TRUE)) character(0) > try(system("convert tmp/3hzbm1353366151.ps tmp/3hzbm1353366151.png",intern=TRUE)) character(0) > try(system("convert tmp/4617r1353366151.ps tmp/4617r1353366151.png",intern=TRUE)) character(0) > try(system("convert tmp/5la1r1353366151.ps tmp/5la1r1353366151.png",intern=TRUE)) character(0) > try(system("convert tmp/6rnmq1353366151.ps tmp/6rnmq1353366151.png",intern=TRUE)) character(0) > try(system("convert tmp/7643f1353366151.ps tmp/7643f1353366151.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.882 0.854 4.728