x <- c(0.471434845,0.473059463,0.473732824,0.472457756,0.471370072,0.467476443,0.464725648,0.466348924,0.466520298,0.472244033,0.471573636,0.473717889,0.475548837,0.476712299,0.47679046,0.476202127,0.474868726,0.469610593,0.467149091,0.467204136,0.467835322,0.462998345,0.465672109,0.466727908,0.469020842,0.470160966,0.470608869,0.471383703,0.470767778,0.465694131,0.462772359,0.463020207,0.465273975,0.470802151,0.472749595,0.473348841,0.472170918,0.475209805,0.477468916,0.479299205,0.478987386,0.473540079,0.467749251,0.464560273,0.471515496,0.473951925,0.476941786,0.477074114,0.479924221,0.481322902,0.47999052,0.481733879,0.481484743,0.472007091,0.465563002,0.462269147,0.470155467,0.475540251,0.477442208,0.480507838,0.480809484,0.48277744,0.481261495,0.483607109,0.480559574,0.47497592,0.469235151,0.465400401,0.476824759,0.48421689,0.490694727)
par2 = '36'
par1 = '0'
#'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
#Author: Prof. Dr. P. Wessa
#To cite this work: Wessa P., (2007), Univariate Explorative Data Analysis (v1.0.5) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_edauni.wasp/
#Source of accompanying publication: Office for Research, Development, and Education
#Technical description: Write here your technical program description
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
x <- as.ts(x)
library(lattice)
postscript(file="/var/www/html/rcomp/tmp/17u5r1229952982.ps",horizontal=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()
postscript(file="/var/www/html/rcomp/tmp/2ysma1229952982.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
hist(x)
grid()
dev.off()
postscript(file="/var/www/html/rcomp/tmp/3zoj01229952982.ps",horizontal=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()
postscript(file="/var/www/html/rcomp/tmp/4s3x71229952982.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
qqnorm(x)
grid()
dev.off()
if (par2 > 0)
{
postscript(file="/var/www/html/rcomp/tmp/56oho1229952982.ps",horizontal=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/www/html/rcomp/tmp/6o2nq1229952982.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
acf(x,lag.max=par2,main='Autocorrelation Function')
grid()
dev.off()
}
summary(x)

#Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
load(file="/var/www/html/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/www/html/rcomp/tmp/7tbf91229952982.tab") 

system("convert tmp/17u5r1229952982.ps tmp/17u5r1229952982.png")
system("convert tmp/2ysma1229952982.ps tmp/2ysma1229952982.png")
system("convert tmp/3zoj01229952982.ps tmp/3zoj01229952982.png")
system("convert tmp/4s3x71229952982.ps tmp/4s3x71229952982.png")
system("convert tmp/56oho1229952982.ps tmp/56oho1229952982.png")
system("convert tmp/6o2nq1229952982.ps tmp/6o2nq1229952982.png")

