R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(13,16,19,15,14,13,19,15,14,15,16,16,16,16,17,15,15,20,18,16,16,16,19,16,17,17,16,15,16,14,15,12,14,16,14,10,10,14,16,16,16,14,20,14,14,11,14,15,16,14,16,14,12,16,9,14,16,16,15,16,12,16,16,14,16,17,18,18,12,16,10,14,18,18,16,17,16,16,13,16,16,16,15,15,16,14,16,16,15,12,17,16,15,13,16,16,16,16,14,16,16,20,15,16,13,17,16,16,12,16,16,17,13,12,18,14,14,13,16,13,16,13,16,15,16,15,17,15,12,16,10,16,12,14,15,13,15,11,12,11,16,15,17,16,10,18,13,16,13,10,15,16,16,14,10,17,13,15,16,12,13,13,12,17,15,10,14,11,13,16,12,16,12,9,12,15,12,12,14,12,16,11,19,15,8,16,17,12,11,11,14,16,12,16,13,15,16,16,14,16,16,14,11,12,15,15,16,16,11,15,12,12,15,15,16,14,17,14,13,15,13,14,15,12,13,8,14,14,11,12,13,10,16,18,13,11,4,13,16,10,12,12,10,13,15,12,14,10,12,12,11,10,12,16,12,14,16,14,13,4,15,11,11,14) > par2 = '36' > par1 = '0' > par2 <- '36' > par1 <- '0' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Univariate Explorative Data Analysis (v1.0.9) 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 > # > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/wessaorg/rcomp/tmp/1dt4d1352106025.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/wessaorg/rcomp/tmp/21b9c1352106025.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/wessaorg/rcomp/tmp/3o7hx1352106025.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/wessaorg/rcomp/tmp/42q1q1352106025.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/wessaorg/rcomp/tmp/5tcrt1352106025.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/wessaorg/rcomp/tmp/6fpgy1352106025.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/wessaorg/rcomp/tmp/7mp961352106025.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. 4.00 13.00 15.00 14.27 16.00 20.00 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/8f4ii1352106025.tab") > > try(system("convert tmp/1dt4d1352106025.ps tmp/1dt4d1352106025.png",intern=TRUE)) character(0) > try(system("convert tmp/21b9c1352106025.ps tmp/21b9c1352106025.png",intern=TRUE)) character(0) > try(system("convert tmp/3o7hx1352106025.ps tmp/3o7hx1352106025.png",intern=TRUE)) character(0) > try(system("convert tmp/42q1q1352106025.ps tmp/42q1q1352106025.png",intern=TRUE)) character(0) > try(system("convert tmp/5tcrt1352106025.ps tmp/5tcrt1352106025.png",intern=TRUE)) character(0) > try(system("convert tmp/6fpgy1352106025.ps tmp/6fpgy1352106025.png",intern=TRUE)) character(0) > try(system("convert tmp/7mp961352106025.ps tmp/7mp961352106025.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.929 0.559 4.503