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(48.03 + ,48.05 + ,48.3 + ,48.45 + ,48.53 + ,48.84 + ,48.9 + ,49.07 + ,49.16 + ,49.23 + ,49.4 + ,49.96 + ,49.96 + ,50.45 + ,50.51 + ,50.89 + ,51.7 + ,52.17 + ,52.95 + ,52.96 + ,53.24 + ,53.31 + ,53.32 + ,53.36 + ,53.61 + ,53.79 + ,53.88 + ,54.34 + ,54.76 + ,55.08 + ,55.23 + ,55.54 + ,55.62 + ,55.74 + ,55.82 + ,55.85 + ,55.91 + ,56.19 + ,56.75 + ,57.11 + ,57.77 + ,57.77 + ,58.22 + ,58.42 + ,58.55 + ,58.59 + ,58.64 + ,58.78 + ,58.96 + ,59.08 + ,59.17 + ,60.32 + ,60.46 + ,60.66 + ,60.94 + ,61.39 + ,61.85 + ,61.85 + ,61.87 + ,62.34 + ,62.37 + ,62.54 + ,63.19 + ,63.45 + ,64.7 + ,64.7 + ,64.81 + ,65.21 + ,65.3 + ,65.87 + ,65.97 + ,66.01 + ,66.28 + ,66.31 + ,66.58 + ,66.64 + ,66.95 + ,67.16 + ,67.25 + ,67.37 + ,67.44 + ,67.48 + ,67.62 + ,67.62 + ,67.77 + ,67.98 + ,68.38 + ,68.39 + ,68.44 + ,68.46 + ,68.55 + ,68.59 + ,68.76 + ,68.77 + ,68.86 + ,69.26 + ,69.36 + ,69.47 + ,69.6 + ,69.75 + ,69.78 + ,69.8 + ,69.93 + ,69.96 + ,70.01 + ,70.06 + ,70.07 + ,70.35 + ,70.38 + ,70.47 + ,70.59 + ,70.91 + ,71.01 + ,71.32 + ,71.34 + ,71.53 + ,71.79 + ,71.9 + ,71.96 + ,72.07 + ,72.16 + ,72.16 + ,72.45 + ,72.65 + ,72.75 + ,72.77 + ,73.02 + ,73.08 + ,73.16 + ,73.29 + ,73.51 + ,73.95 + ,74.39 + ,74.48 + ,74.54 + ,74.57 + ,74.65 + ,74.7 + ,74.86 + ,74.91 + ,74.93 + ,74.99 + ,75.04 + ,75.46 + ,75.49 + ,75.66 + ,75.69 + ,75.78 + ,75.8 + ,75.82 + ,75.87 + ,75.97 + ,76.04 + ,76.07 + ,76.15 + ,76.16 + ,76.19 + ,76.2 + ,76.27 + ,76.29 + ,76.39 + ,76.47 + ,76.49 + ,76.6 + ,76.65 + ,76.9 + ,77.03 + ,77.06 + ,77.14 + ,77.15 + ,77.31 + ,77.42 + ,77.42 + ,77.47 + ,77.51 + ,77.78 + ,77.79 + ,78.01 + ,78.16 + ,78.19 + ,78.2 + ,78.27 + ,78.38 + ,78.67 + ,78.75 + ,78.8 + ,78.86 + ,78.91 + ,79.16 + ,79.23 + ,79.31 + ,79.34 + ,79.88 + ,79.89 + ,79.91 + ,79.98 + ,80.03 + ,80.25 + ,80.27 + ,80.47 + ,80.48 + ,80.58 + ,80.64 + ,80.7 + ,80.7 + ,81.08 + ,81.14 + ,81.19 + ,81.22 + ,81.57 + ,81.58 + ,81.69 + ,81.7 + ,81.93 + ,81.95 + ,82.13 + ,82.22 + ,82.39 + ,82.44 + ,82.48 + ,82.83 + ,83.07 + ,83.23 + ,83.36 + ,83.48 + ,83.63 + ,83.64 + ,83.94 + ,84.03 + ,84.1 + ,84.26 + ,84.34 + ,84.44 + ,84.5 + ,84.65 + ,84.67 + ,85.1 + ,85.19 + ,85.23 + ,85.25 + ,85.3 + ,85.32 + ,85.59 + ,85.66 + ,86.02 + ,86.24 + ,86.4 + ,86.44 + ,86.73 + ,86.82 + ,86.92 + ,86.97 + ,86.98 + ,87.07 + ,87.09 + ,87.28 + ,87.28 + ,87.35 + ,87.38 + ,87.48) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/wessaorg/rcomp/tmp/1ryxw1352849108.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/2wg081352849108.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/33oy01352849108.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/4y3ex1352849108.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/5hso71352849108.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/6fgx81352849108.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. 48.03 64.70 73.40 71.35 79.93 87.48 > > #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/776tz1352849108.tab") > > try(system("convert tmp/1ryxw1352849108.ps tmp/1ryxw1352849108.png",intern=TRUE)) character(0) > try(system("convert tmp/2wg081352849108.ps tmp/2wg081352849108.png",intern=TRUE)) character(0) > try(system("convert tmp/33oy01352849108.ps tmp/33oy01352849108.png",intern=TRUE)) character(0) > try(system("convert tmp/4y3ex1352849108.ps tmp/4y3ex1352849108.png",intern=TRUE)) character(0) > try(system("convert tmp/5hso71352849108.ps tmp/5hso71352849108.png",intern=TRUE)) character(0) > try(system("convert tmp/6fgx81352849108.ps tmp/6fgx81352849108.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.385 0.793 6.182