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(84,72,49,85,36,53,74,22,68,47,102,131,81,108,63,146,91,61,53,112,97,92,51,132,99,98,59,98,71,100,113,92,127,96,100,69,106,51,18,91,75,75,79,59,29,85,66,106,113,101,65,7,111,61,41,70,136,87,102,84,101,57,61,92,80,46,80,88,80,68,101,63,111,65,91,92,90,70,94,75,55,80,95,42,27,62,97,88,59,92,40,91,63,88,85,76,75,69,150,77,103,81,37,64,22,38,61,93,69,80,97,87,0,61,30,82,56,0,40,9,94,110,71,50,21,78,118,102,109,104,124,76,57,95,109,74,98,63,89,74,20,65,74,78,91,132,79,100,0,0,0,0,0,0,48,63,0,0,0,13,4,31,0,29) > par2 = '0' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/wessaorg/rcomp/tmp/1wdoy1321974184.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/2g7zs1321974184.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/3rng11321974184.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/45nsw1321974184.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/wessaorg/rcomp/tmp/5n4m11321974184.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/wessaorg/rcomp/tmp/645xj1321974184.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/wessaorg/rcomp/tmp/733g01321974184.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() + } > summary(x) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.00 53.00 75.00 70.85 94.25 150.00 > > #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/81w3x1321974184.tab") > > try(system("convert tmp/1wdoy1321974184.ps tmp/1wdoy1321974184.png",intern=TRUE)) character(0) > try(system("convert tmp/2g7zs1321974184.ps tmp/2g7zs1321974184.png",intern=TRUE)) character(0) > try(system("convert tmp/3rng11321974184.ps tmp/3rng11321974184.png",intern=TRUE)) character(0) > try(system("convert tmp/45nsw1321974184.ps tmp/45nsw1321974184.png",intern=TRUE)) character(0) > try(system("convert tmp/5n4m11321974184.ps tmp/5n4m11321974184.png",intern=TRUE)) convert: unable to open image `tmp/5n4m11321974184.ps': No such file or directory @ blob.c/OpenBlob/2480. convert: missing an image filename `tmp/5n4m11321974184.png' @ convert.c/ConvertImageCommand/2838. character(0) Warning message: running command 'convert tmp/5n4m11321974184.ps tmp/5n4m11321974184.png' had status 1 > try(system("convert tmp/645xj1321974184.ps tmp/645xj1321974184.png",intern=TRUE)) convert: unable to open image `tmp/645xj1321974184.ps': No such file or directory @ blob.c/OpenBlob/2480. convert: missing an image filename `tmp/645xj1321974184.png' @ convert.c/ConvertImageCommand/2838. character(0) Warning message: running command 'convert tmp/645xj1321974184.ps tmp/645xj1321974184.png' had status 1 > try(system("convert tmp/733g01321974184.ps tmp/733g01321974184.png",intern=TRUE)) convert: unable to open image `tmp/733g01321974184.ps': No such file or directory @ blob.c/OpenBlob/2480. convert: missing an image filename `tmp/733g01321974184.png' @ convert.c/ConvertImageCommand/2838. character(0) Warning message: running command 'convert tmp/733g01321974184.ps tmp/733g01321974184.png' had status 1 > > > proc.time() user system elapsed 1.324 0.265 1.615