x <- c(98.5,99.3,98,98.1,98,96.5,96.1,96.3,96.1,95.4,95.3,93.9,94,93.6,93.5,93.5,93.5,93,93.1,93.3,93.2,93.1,93.1,93.2,93,93.1,93.2,93.1,93.1,93.1,92.3,92.3,92.3,92.3,92.1,92.1,92.1,92,92,92.3,93.3,92.4,92.6,92.7,92.4,92.2,92.7,92.7,92.8,92.8,92.8,92.7,92.8,93.6,93.4,93.8,93.8,93.9,94,93.9,93.9)
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/1me981197902297.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/2h97b1197902297.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/3s3e61197902297.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/4a5um1197902298.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/51guo1197902298.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/6hxrh1197902298.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/7xen61197902298.tab") 

system("convert tmp/1me981197902297.ps tmp/1me981197902297.png")
system("convert tmp/2h97b1197902297.ps tmp/2h97b1197902297.png")
system("convert tmp/3s3e61197902297.ps tmp/3s3e61197902297.png")
system("convert tmp/4a5um1197902298.ps tmp/4a5um1197902298.png")
system("convert tmp/51guo1197902298.ps tmp/51guo1197902298.png")
system("convert tmp/6hxrh1197902298.ps tmp/6hxrh1197902298.png")

