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(131.676 + ,135.050 + ,129.070 + ,137.792 + ,139.762 + ,142.917 + ,144.198 + ,142.648 + ,152.170 + ,136.022 + ,138.142 + ,138.135 + ,135.027 + ,132.911 + ,133.976 + ,137.012 + ,119.610 + ,118.106 + ,120.383 + ,133.185 + ,131.416 + ,134.248 + ,134.397 + ,127.728 + ,131.837 + ,125.955 + ,134.187 + ,143.291 + ,145.074 + ,149.812 + ,144.668 + ,147.253 + ,145.568 + ,155.564 + ,155.872 + ,156.323 + ,158.010 + ,155.598 + ,154.785 + ,157.294 + ,162.938 + ,157.283 + ,166.074 + ,169.282 + ,172.552 + ,174.055 + ,175.409 + ,173.696 + ,171.283 + ,173.322 + ,170.717 + ,174.229 + ,175.339 + ,173.511 + ,175.839 + ,173.816 + ,173.990 + ,174.777 + ,174.819 + ,176.726 + ,176.199 + ,180.952 + ,176.663 + ,182.346 + ,180.605 + ,182.497 + ,187.856 + ,190.020 + ,190.108 + ,193.288 + ,193.230 + ,199.068 + ,195.076 + ,191.563 + ,191.067 + ,186.665 + ,185.508 + ,184.371 + ,183.046 + ,175.714 + ,175.768 + ,171.029 + ,170.465 + ,170.102 + ,156.389 + ,124.291 + ,99.360 + ,86.675 + ,85.056 + ,128.236 + ,164.257 + ,162.401 + ,152.779 + ,156.005 + ,153.387 + ,153.190 + ,148.840 + ,144.211 + ,145.953 + ,145.542 + ,150.271 + ,147.489 + ,143.824 + ,134.754 + ,131.736 + ,126.304 + ,125.511 + ,125.495 + ,130.133 + ,126.257 + ,110.323 + ,98.417 + ,105.749 + ,120.665 + ,124.075 + ,127.245 + ,146.731 + ,144.979 + ,148.210 + ,144.670 + ,142.970 + ,142.524 + ,146.142 + ,146.522 + ,148.128 + ,148.798 + ,150.181 + ,152.388 + ,155.694 + ,160.662 + ,155.520 + ,158.262 + ,154.338 + ,158.196 + ,160.371 + ,154.856 + ,150.636 + ,145.899 + ,141.242 + ,140.834 + ,141.119 + ,139.104 + ,134.437 + ,129.425 + ,123.155 + ,119.273 + ,120.472 + ,121.523 + ,121.983 + ,123.658 + ,124.794 + ,124.827 + ,120.382 + ,117.395 + ,115.790 + ,114.283 + ,117.271 + ,117.448 + ,118.764 + ,120.550 + ,123.554 + ,125.412 + ,124.182 + ,119.828 + ,115.361 + ,114.226 + ,115.214 + ,115.864 + ,114.276 + ,113.469 + ,114.883 + ,114.172 + ,111.225 + ,112.149 + ,115.618 + ,118.002 + ,121.382 + ,120.663 + ,128.049 + ,127.297) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/fisher/rcomp/tmp/1fcfi1353255268.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/245kx1353255268.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/3tp7m1353255268.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/441x81353255268.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/5ncc01353255268.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/68eaz1353255268.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/75udn1353255268.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. 85.06 125.30 144.20 145.00 161.10 199.10 > > #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/8392d1353255268.tab") > > try(system("convert tmp/1fcfi1353255268.ps tmp/1fcfi1353255268.png",intern=TRUE)) character(0) > try(system("convert tmp/245kx1353255268.ps tmp/245kx1353255268.png",intern=TRUE)) character(0) > try(system("convert tmp/3tp7m1353255268.ps tmp/3tp7m1353255268.png",intern=TRUE)) character(0) > try(system("convert tmp/441x81353255268.ps tmp/441x81353255268.png",intern=TRUE)) character(0) > try(system("convert tmp/5ncc01353255268.ps tmp/5ncc01353255268.png",intern=TRUE)) character(0) > try(system("convert tmp/68eaz1353255268.ps tmp/68eaz1353255268.png",intern=TRUE)) character(0) > try(system("convert tmp/75udn1353255268.ps tmp/75udn1353255268.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.949 0.854 4.800