R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing 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(1413 + ,1816 + ,1119 + ,1215 + ,1614 + ,1813 + ,1419 + ,1415 + ,1514 + ,1515 + ,1716 + ,1916 + ,1016 + ,1616 + ,1817 + ,1415 + ,1415 + ,1720 + ,1418 + ,1616 + ,1816 + ,1116 + ,1419 + ,1216 + ,1717 + ,917 + ,1616 + ,1415 + ,1516 + ,1114 + ,1615 + ,1312 + ,1714 + ,1516 + ,1414 + ,1610 + ,910 + ,1514 + ,1716 + ,1316 + ,1516 + ,1614 + ,1620 + ,1214 + ,1514 + ,1111 + ,1514 + ,1515 + ,1716 + ,1314 + ,1616 + ,1414 + ,1112 + ,1216 + ,129 + ,1514 + ,1616 + ,1516 + ,1215 + ,1216 + ,812 + ,1316 + ,1116 + ,1414 + ,1516 + ,1017 + ,1118 + ,1218 + ,1512 + ,1516 + ,1410 + ,1614 + ,1518 + ,1518 + ,1316 + ,1217 + ,1716 + ,1316 + ,1513 + ,1316 + ,1516 + ,1516 + ,1615 + ,1515 + ,1416 + ,1514 + ,1416 + ,1316 + ,715 + ,1712 + ,1317 + ,1516 + ,1415 + ,1313 + ,1616 + ,1216 + ,1416 + ,1716 + ,1514 + ,1716 + ,1216 + ,1620 + ,1115 + ,1516 + ,913 + ,1617 + ,1516 + ,1016 + ,1012 + ,1516 + ,1116 + ,1317 + ,1413 + ,1812 + ,1618 + ,1414 + ,1414 + ,1413 + ,1416 + ,1213 + ,1416 + ,1513 + ,1516 + ,1515 + ,1316 + ,1715 + ,1717 + ,1915 + ,1512 + ,1316 + ,910 + ,1516 + ,1512 + ,1514 + ,1615 + ,1113 + ,1415 + ,1111 + ,1512 + ,1311 + ,1516 + ,1615 + ,1417 + ,1516 + ,1610 + ,1618 + ,1113 + ,1216 + ,913 + ,1610 + ,1315 + ,1616 + ,1216 + ,914 + ,1310 + ,1317 + ,1413 + ,1915 + ,1316 + ,1212 + ,1313 + ,1013 + ,1412 + ,1617 + ,1015 + ,1110 + ,1414 + ,1211 + ,913 + ,916 + ,1112 + ,1616 + ,912 + ,139 + ,1612 + ,1315 + ,912 + ,1212 + ,1614 + ,1112 + ,1416 + ,1311 + ,1519 + ,1415 + ,168 + ,1316 + ,1417 + ,1512 + ,1311 + ,1111 + ,1114 + ,1416 + ,1512 + ,1116 + ,1513 + ,1215 + ,1416 + ,1416 + ,814 + ,1316 + ,916 + ,1514 + ,1711 + ,1312 + ,1515 + ,1515 + ,1416 + ,1616 + ,1311 + ,1615 + ,912 + ,1612 + ,1115 + ,1015 + ,1116 + ,1514 + ,1717 + ,1414 + ,813 + ,1515 + ,1113 + ,1614 + ,1015 + ,1512 + ,913 + ,168 + ,1914 + ,1214 + ,811 + ,1112 + ,1413 + ,910 + ,1516 + ,1318 + ,1613 + ,1111 + ,124 + ,1313 + ,1016 + ,1110 + ,1212 + ,812 + ,1210 + ,1213 + ,1515 + ,1112 + ,1314 + ,1410 + ,1012 + ,1212 + ,1511 + ,1310 + ,1312 + ,1316 + ,1212 + ,1214 + ,916 + ,914 + ,1513 + ,104 + ,1415 + ,1511 + ,711 + ,1414) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/fisher/rcomp/tmp/1vqxa1384986187.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/fisher/rcomp/tmp/2jk1z1384986187.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/fisher/rcomp/tmp/3o5e31384986187.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/fisher/rcomp/tmp/4x9d21384986187.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/fisher/rcomp/tmp/5tymq1384986187.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/fisher/rcomp/tmp/6p3l81384986187.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/fisher/rcomp/tmp/7r1st1384986187.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. 104 1212 1414 1338 1516 1916 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/80s9i1384986187.tab") > > try(system("convert tmp/1vqxa1384986187.ps tmp/1vqxa1384986187.png",intern=TRUE)) character(0) > try(system("convert tmp/2jk1z1384986187.ps tmp/2jk1z1384986187.png",intern=TRUE)) character(0) > try(system("convert tmp/3o5e31384986187.ps tmp/3o5e31384986187.png",intern=TRUE)) character(0) > try(system("convert tmp/4x9d21384986187.ps tmp/4x9d21384986187.png",intern=TRUE)) character(0) > try(system("convert tmp/5tymq1384986187.ps tmp/5tymq1384986187.png",intern=TRUE)) character(0) > try(system("convert tmp/6p3l81384986187.ps tmp/6p3l81384986187.png",intern=TRUE)) character(0) > try(system("convert tmp/7r1st1384986187.ps tmp/7r1st1384986187.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.974 0.867 4.829