R version 2.12.0 (2010-10-15) Copyright (C) 2010 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,81,87,87,136,147,168,185,137,125,64,45,35,-4,88,85,95,128,186,182,151,106,60,44,30,54,72,88,153,168,181,180,149,84,85,42,54,30,96,110,141,159,164,155,135,93,28,56,56,22,76,83,121,151,208,179,139,99,103,57,44,70,58,91,126,146,199,194,145,131,74,-3,7,10,34,94,105,151,162,175,128,115,62,11,-7,64,80,77,127,158,173,206,147,103,73,52,52,68,77,94,147,160,166,167,155,104,44,53,56,36,76,99,142,150,190,176,175,112,73,52,48,61,68,97,146,160,155,175,163,117,82,55,32,48,53,82,139,150,184,185,138,147,77,32,48,72,76,94,133,164,174,187,149,102,86,35,31,28,75,102,133,178,190,190,147,83,83,46,40,50,61,102,117,158,170,190,155,117,68,40,56,28,66,103,122,166,176,164,160,139,75,44,22,32,42,86,140,163,222,166,183,140,98,69,75,63,81,126,139,171,170,173,144,105,75,41,68,53,61,87,155,159,180,175,138,105,73,26,12,35,64,115,138,138,182,191,155,113,98,29) > par2 = '36' > par1 = '0' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/www/rcomp/tmp/1mwkt1321540724.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/www/rcomp/tmp/2xc3e1321540724.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/www/rcomp/tmp/3xgpe1321540724.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/www/rcomp/tmp/44kww1321540724.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/www/rcomp/tmp/5t30x1321540724.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/www/rcomp/tmp/6mj091321540724.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/www/rcomp/tmp/7pymp1321540724.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. -7.00 61.75 102.00 106.40 153.50 222.00 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/8x98k1321540724.tab") > > try(system("convert tmp/1mwkt1321540724.ps tmp/1mwkt1321540724.png",intern=TRUE)) character(0) > try(system("convert tmp/2xc3e1321540724.ps tmp/2xc3e1321540724.png",intern=TRUE)) character(0) > try(system("convert tmp/3xgpe1321540724.ps tmp/3xgpe1321540724.png",intern=TRUE)) character(0) > try(system("convert tmp/44kww1321540724.ps tmp/44kww1321540724.png",intern=TRUE)) character(0) > try(system("convert tmp/5t30x1321540724.ps tmp/5t30x1321540724.png",intern=TRUE)) character(0) > try(system("convert tmp/6mj091321540724.ps tmp/6mj091321540724.png",intern=TRUE)) character(0) > try(system("convert tmp/7pymp1321540724.ps tmp/7pymp1321540724.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.210 0.260 3.486