R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(68.897,38.683,44.720,39.525,45.315,50.380,40.600,36.279,42.438,38.064,31.879,11.379,70.249,39.253,47.060,41.697,38.708,49.267,39.018,32.228,40.870,39.383,34.571,12.066,70.938,34.077,45.409,40.809,37.013,44.953,37.848,32.745,39.401,34.931,33.008,8.620,68.906,39.556,50.669,36.432,40.891,48.428,36.222,33.425,39.401,37.967,34.801,12.657,69.116,41.519,51.321,38.529,41.547,52.073,38.401,40.898,40.439,41.888,37.898,8.771,68.184,50.530,47.221,41.756,45.633,48.138,39.486,39.341,41.117,41.629,29.722,7.054,56.676,34.870,35.117,30.169,30.936,35.699,33.228,27.733,33.666,35.429,27.438,8.170,63.410,38.040,45.389,37.353,37.024,50.957,37.994,36.454,46.080,43.373,37.395) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/wessaorg/rcomp/tmp/187511322135598.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/wessaorg/rcomp/tmp/2zkb61322135598.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/wessaorg/rcomp/tmp/3rq0p1322135598.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/wessaorg/rcomp/tmp/44vzq1322135598.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(x) > grid() > dev.off() null device 1 > if (par2 > 0) + { + postscript(file="/var/wessaorg/rcomp/tmp/5qfmw1322135598.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=paste('Lag plot, lowess, and regression line')) + lines(lowess(z)) + abline(lm(z)) + dev.off() + postscript(file="/var/wessaorg/rcomp/tmp/6wu891322135598.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. 7.054 35.020 39.340 39.750 45.130 70.940 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/76d1q1322135598.tab") > > try(system("convert tmp/187511322135598.ps tmp/187511322135598.png",intern=TRUE)) character(0) > try(system("convert tmp/2zkb61322135598.ps tmp/2zkb61322135598.png",intern=TRUE)) character(0) > try(system("convert tmp/3rq0p1322135598.ps tmp/3rq0p1322135598.png",intern=TRUE)) character(0) > try(system("convert tmp/44vzq1322135598.ps tmp/44vzq1322135598.png",intern=TRUE)) character(0) > try(system("convert tmp/5qfmw1322135598.ps tmp/5qfmw1322135598.png",intern=TRUE)) character(0) > try(system("convert tmp/6wu891322135598.ps tmp/6wu891322135598.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.693 0.337 2.054