R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(11.73 + ,11.75 + ,11.39 + ,11.54 + ,9.62 + ,9.82 + ,9.94 + ,9.9 + ,9.8 + ,9.86 + ,10.5 + ,10.33 + ,10.16 + ,9.91 + ,9.96 + ,10.03 + ,9.55 + ,9.51 + ,9.8 + ,10.08 + ,10.2 + ,10.23 + ,10.2 + ,10.07 + ,10.01 + ,10.05 + ,9.92 + ,10.03 + ,10.18 + ,10.1 + ,10.16 + ,10.15 + ,10.13 + ,10.09 + ,10.18 + ,10.06 + ,9.65 + ,9.74 + ,9.53 + ,9.5 + ,9 + ,9.15 + ,9.32 + ,9.62 + ,9.59 + ,9.37 + ,9.35 + ,9.32 + ,9.49 + ,9.52 + ,9.59 + ,9.35 + ,9.2 + ,9.57 + ,9.78 + ,9.79 + ,9.57 + ,9.53 + ,9.65 + ,9.36 + ,9.4 + ,9.32 + ,9.31 + ,9.19 + ,9.39 + ,9.28 + ,9.28 + ,9.31 + ,9.28 + ,9.31 + ,9.35 + ,9.19 + ,9.07 + ,8.96 + ,8.69 + ,8.58 + ,8.56 + ,8.47 + ,8.46 + ,8.75 + ,8.95 + ,9.33 + ,9.51 + ,9.561 + ,9.94 + ,9.9 + ,9.275 + ,9.56 + ,9.779 + ,9.746 + ,9.991 + ,9.98 + ,10.195 + ,10.31 + ,10.25 + ,9.871 + ,10.06 + ,9.894 + ,9.59 + ,9.64 + ,9.89 + ,9.53 + ,9.388 + ,9.16 + ,9.418 + ,9.57 + ,9.857 + ,9.877 + ,9.76 + ,9.76 + ,9.695 + ,9.475 + ,9.262 + ,9.097 + ,8.55 + ,8.16 + ,7.532 + ,7.325 + ,6.749 + ,7.13 + ,6.995 + ,7.346 + ,7.73 + ,7.837 + ,7.514 + ,7.58 + ,6.83 + ,6.617 + ,6.715 + ,6.63 + ,6.891 + ,7.002 + ,7.09 + ,7.36 + ,7.477 + ,7.826 + ,7.79 + ,7.578 + ,7.204 + ,7.198 + ,7.685 + ,7.795 + ,7.46 + ,7.274 + ,7.33 + ,7.655 + ,7.767 + ,7.84 + ,7.424 + ,7.54 + ,7.351 + ,6.735 + ,6.777 + ,6.679 + ,7.34 + ,6.978 + ,6.92 + ,6.628 + ,6.385 + ,5.984 + ,6.268 + ,6.596 + ,6.395 + ,6.715 + ,6.804 + ,6.929 + ,6.846 + ,6.992 + ,6.774 + ,6.75 + ,6.485 + ,6.27 + ,6.47 + ,6.78 + ,6.71 + ,6.141 + ,6.72 + ,6.68 + ,6.371 + ,6.097 + ,6.27 + ,6.447 + ,6.37 + ,6.446 + ,6.54 + ,6.374 + ,6.33 + ,6.63 + ,6.498 + ,6.485 + ,6.36) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/www/rcomp/tmp/1p71t1321988750.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/www/rcomp/tmp/22kf01321988750.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/www/rcomp/tmp/3s6cs1321988750.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/www/rcomp/tmp/4kroy1321988750.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/www/rcomp/tmp/5fe4p1321988750.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/www/rcomp/tmp/6clhc1321988750.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/www/rcomp/tmp/74nvx1321988750.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. 5.984 7.110 9.280 8.594 9.779 11.750 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/84j1u1321988750.tab") > > try(system("convert tmp/1p71t1321988750.ps tmp/1p71t1321988750.png",intern=TRUE)) character(0) > try(system("convert tmp/22kf01321988750.ps tmp/22kf01321988750.png",intern=TRUE)) character(0) > try(system("convert tmp/3s6cs1321988750.ps tmp/3s6cs1321988750.png",intern=TRUE)) character(0) > try(system("convert tmp/4kroy1321988750.ps tmp/4kroy1321988750.png",intern=TRUE)) character(0) > try(system("convert tmp/5fe4p1321988750.ps tmp/5fe4p1321988750.png",intern=TRUE)) character(0) > try(system("convert tmp/6clhc1321988750.ps tmp/6clhc1321988750.png",intern=TRUE)) character(0) > try(system("convert tmp/74nvx1321988750.ps tmp/74nvx1321988750.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.960 0.180 2.142