x <- c(109.20,88.60,94.30,98.30,86.40,80.60,104.10,108.20,93.40,71.90,94.10,94.90,96.40,91.10,84.40,86.40,88.00,75.10,109.70,103.00,82.10,68.00,96.40,94.30,90.00,88.00,76.10,82.50,81.40,66.50,97.20,94.10,80.70,70.50,87.80,89.50,99.60,84.20,75.10,92.00,80.80,73.10,99.80,90.00,83.10,72.40,78.80,87.30,91.00,80.10,73.60,86.40,74.50,71.20,92.40,81.50,85.30,69.90,84.20,90.70,100.30)
par2 = '1'
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/1ip7r1192983945.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/2szm01192983945.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/3166w1192983945.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/4wr7i1192983945.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/565qw1192983945.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/6jtw51192983945.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)
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/7qrx41192983945.tab") 

system("convert tmp/1ip7r1192983945.ps tmp/1ip7r1192983945.png")
system("convert tmp/2szm01192983945.ps tmp/2szm01192983945.png")
system("convert tmp/3166w1192983945.ps tmp/3166w1192983945.png")
system("convert tmp/4wr7i1192983945.ps tmp/4wr7i1192983945.png")
system("convert tmp/565qw1192983945.ps tmp/565qw1192983945.png")
system("convert tmp/6jtw51192983945.ps tmp/6jtw51192983945.png")

