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(61.04 + ,64.21 + ,63.92 + ,68.48 + ,67.76 + ,65.37 + ,61.84 + ,59.88 + ,62.91 + ,63.67 + ,59.96 + ,62.80 + ,64.26 + ,66.35 + ,67.43 + ,69.45 + ,72.98 + ,71.58 + ,69.97 + ,71.93 + ,68.53 + ,71.29 + ,72.75 + ,71.64 + ,69.97 + ,70.78 + ,73.52 + ,73.86 + ,76.80 + ,74.57 + ,73.36 + ,74.77 + ,74.35 + ,71.14 + ,72.51 + ,69.19 + ,66.25 + ,63.33 + ,60.55 + ,62.91 + ,59.76 + ,58.57 + ,59.33 + ,60.75 + ,59.05 + ,59.59 + ,58.97 + ,59.24 + ,63.28 + ,62.03 + ,63.43 + ,62.41 + ,61.05 + ,56.31 + ,53.30 + ,51.99 + ,55.42 + ,59.02 + ,59.89 + ,59.39 + ,61.44 + ,61.64 + ,59.69 + ,57.11 + ,62.28 + ,65.87 + ,64.28 + ,63.63 + ,64.11 + ,66.46 + ,61.93 + ,62.37 + ,64.94 + ,65.20 + ,65.08 + ,64.76 + ,68.00 + ,69.14 + ,70.68 + ,72.81 + ,73.93 + ,75.79 + ,77.02 + ,75.48 + ,71.47 + ,71.98 + ,71.09 + ,74.04 + ,76.70 + ,79.10 + ,81.62 + ,81.66 + ,81.22 + ,83.69 + ,88.60 + ,91.86 + ,95.93 + ,96.32 + ,93.84 + ,98.18 + ,88.71 + ,88.28 + ,91.27 + ,93.31 + ,96.00 + ,95.98 + ,97.91 + ,92.69 + ,90.57 + ,90.71 + ,88.96 + ,91.77 + ,95.50 + ,98.81 + ,01.84 + ,05.15 + ,10.21 + ,01.84 + ,05.62 + ,06.23 + ,10.14 + ,16.69 + ,18.52 + ,16.32 + ,25.96 + ,26.29 + ,32.19 + ,27.35 + ,38.54 + ,34.86 + ,35.36 + ,40.21 + ,45.29 + ,45.08 + ,28.88 + ,23.26 + ,25.10 + ,15.20 + ,13.77 + ,14.59 + ,15.46 + ,06.23 + ,01.18 + ,04.55 + ,06.89 + ,93.88 + ,77.70 + ,71.85 + ,64.15 + ,67.81 + ,61.04 + ,57.04 + ,49.93 + ,54.43 + ,40.81 + ,46.28 + ,42.36 + ,37.71 + ,44.60 + ,46.34 + ,40.83 + ,36.51 + ,46.47 + ,41.68 + ,40.17 + ,37.51 + ,40.03 + ,44.76 + ,45.52 + ,46.25 + ,52.07 + ,52.38 + ,52.51 + ,52.24 + ,50.33 + ,51.55 + ,53.20 + ,58.63 + ,56.34 + ,61.67 + ,66.31 + ,68.44 + ,72.04 + ,69.55 + ,69.16 + ,65.63 + ,59.89 + ,63.56 + ,68.05 + ,69.45 + ,70.93 + ,67.51 + ,73.89 + ,72.74 + ,68.02 + ,69.29 + ,72.04 + ,66.02 + ,69.95 + ,71.77 + ,78.53 + ,80.50 + ,77.00 + ,77.43 + ,76.35 + ,77.47 + ,76.05 + ,75.47 + ,69.87 + ,73.36 + ,78.05 + ,79.36 + ,82.75 + ,78.00 + ,74.54 + ,72.89 + ,71.19 + ,74.13 + ,79.81 + ,79.66 + ,81.50 + ,81.24 + ,80.68 + ,80.00 + ,84.87 + ,84.92 + ,83.24 + ,85.12 + ,86.15 + ,75.11 + ,71.61 + ,70.04 + ,73.97 + ,71.51 + ,73.78 + ,77.18 + ,78.86 + ,72.14 + ,76.09 + ,76.01 + ,78.98 + ,78.95 + ,80.70 + ,75.39 + ,73.82 + ,75.17 + ,74.60 + ,76.45 + ,73.66 + ,76.49 + ,81.58 + ,82.66 + ,81.25 + ,81.69 + ,81.43 + ,86.85 + ,84.88 + ,81.98 + ,83.76 + ,89.19 + ,87.79 + ,88.02 + ,91.51 + ,91.38 + ,88.03 + ,91.54 + ,89.11 + ,89.34 + ,89.03 + ,85.58 + ,86.20 + ,97.88 + ,04.42 + ,01.16 + ,01.07 + ,05.40 + ,07.94 + ,12.79 + ,09.66 + ,12.29 + ,13.93 + ,97.18 + ,99.65 + ,00.10 + ,00.59 + ,00.22 + ,99.29 + ,93.01 + ,91.16 + ,94.94 + ,96.20 + ,97.24 + ,99.87 + ,95.70 + ,86.88 + ,85.38 + ,82.26 + ,85.37 + ,86.45 + ,87.24 + ,87.96 + ,79.85 + ,79.20 + ,82.98 + ,86.80 + ,87.40 + ,93.32 + ,94.26 + ,98.99) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/wessaorg/rcomp/tmp/1aukm1321382712.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/2zkq31321382712.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/32zch1321382712.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/45boj1321382712.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/5on0h1321382712.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/63jn01321382712.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. 0.10 58.97 70.78 64.86 81.22 99.87 > > #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/78flh1321382712.tab") > > try(system("convert tmp/1aukm1321382712.ps tmp/1aukm1321382712.png",intern=TRUE)) character(0) > try(system("convert tmp/2zkq31321382712.ps tmp/2zkq31321382712.png",intern=TRUE)) character(0) > try(system("convert tmp/32zch1321382712.ps tmp/32zch1321382712.png",intern=TRUE)) character(0) > try(system("convert tmp/45boj1321382712.ps tmp/45boj1321382712.png",intern=TRUE)) character(0) > try(system("convert tmp/5on0h1321382712.ps tmp/5on0h1321382712.png",intern=TRUE)) character(0) > try(system("convert tmp/63jn01321382712.ps tmp/63jn01321382712.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.918 0.386 2.372