R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(3035 + ,2932 + ,2852 + ,2830 + ,2850 + ,2881 + ,2934 + ,2959 + ,2952 + ,3019 + ,3019 + ,3036 + ,3100 + ,3178 + ,3184 + ,3312 + ,3335 + ,3352 + ,3358 + ,3277 + ,3352 + ,3313 + ,3352 + ,3358 + ,3251 + ,3223 + ,3239 + ,3272 + ,3397 + ,3374 + ,3400 + ,3410 + ,3463 + ,3482 + ,3546 + ,3546 + ,3633 + ,3661 + ,3684 + ,3698 + ,3757 + ,3660 + ,3701 + ,3774 + ,3697 + ,3721 + ,3703 + ,3585 + ,3490 + ,3460 + ,3431 + ,3294 + ,3233 + ,3282 + ,3127 + ,3189 + ,3263 + ,3251 + ,3203 + ,3242 + ,3248 + ,3057 + ,2987 + ,2952 + ,3011 + ,3020 + ,2975 + ,2999 + ,2987 + ,2974 + ,3022 + ,3053 + ,3066 + ,3125 + ,3239 + ,3127 + ,3117 + ,3131 + ,3130 + ,3130 + ,3128 + ,3131 + ,3206 + ,3330 + ,3390 + ,3353 + ,3271 + ,3236 + ,3087 + ,3137 + ,3143 + ,3135 + ,3115 + ,3035 + ,3000 + ,3006 + ,2980 + ,2995 + ,2979 + ,2902 + ,2865 + ,2884 + ,2962 + ,3010 + ,3010 + ,2973 + ,2999 + ,2953 + ,2904 + ,2878 + ,2863 + ,2891 + ,2927 + ,2980 + ,2997 + ,3001 + ,3014 + ,2987 + ,2914 + ,2917 + ,2967 + ,3027 + ,3040 + ,2986 + ,2967 + ,2995 + ,3018 + ,3114 + ,3170 + ,3170 + ,3142 + ,3228 + ,3202 + ,3194 + ,3099 + ,3058 + ,3076 + ,3180 + ,3166 + ,3168 + ,3186 + ,3187 + ,3207 + ,3194 + ,3093 + ,3025 + ,3047 + ,3073 + ,3011 + ,3008 + ,2989 + ,2965 + ,2952 + ,2941 + ,2975 + ,2945 + ,2943 + ,2871 + ,2871 + ,2943 + ,2871 + ,2943 + ,2871 + ,2871 + ,2943 + ,2871 + ,2943 + ,2871 + ,2871 + ,2943 + ,2871 + ,2943 + ,2871 + ,3060 + ,3067 + ,3092 + ,3067 + ,3092 + ,3092 + ,3067 + ,3092 + ,3067 + ,3092 + ,3092 + ,2792 + ,2716 + ,2730 + ,2727 + ,2680 + ,2634 + ,2678 + ,2721 + ,2664 + ,2694 + ,2608 + ,2575 + ,2592 + ,2622 + ,2660 + ,2562 + ,2684 + ,2632 + ,2659 + ,2658 + ,2700 + ,2650 + ,2610 + ,2644 + ,2607 + ,2611 + ,2670 + ,2683 + ,2727 + ,2779 + ,2770 + ,2723 + ,2658) > par2 = '36' > par1 = '0' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/wessaorg/rcomp/tmp/1sn5z1321397588.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/2q21p1321397588.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/3o1ci1321397588.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/4g4w71321397588.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(x) > grid() > dev.off() null device 1 > if (par2 > 0) + { + postscript(file="/var/wessaorg/rcomp/tmp/5rk761321397588.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=paste('Lag plot, lowess, and regression line')) + lines(lowess(z)) + abline(lm(z)) + dev.off() + postscript(file="/var/wessaorg/rcomp/tmp/6kafx1321397588.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. 2562 2914 3025 3060 3194 3774 > > #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/7qp5u1321397588.tab") > > try(system("convert tmp/1sn5z1321397588.ps tmp/1sn5z1321397588.png",intern=TRUE)) character(0) > try(system("convert tmp/2q21p1321397588.ps tmp/2q21p1321397588.png",intern=TRUE)) character(0) > try(system("convert tmp/3o1ci1321397588.ps tmp/3o1ci1321397588.png",intern=TRUE)) character(0) > try(system("convert tmp/4g4w71321397588.ps tmp/4g4w71321397588.png",intern=TRUE)) character(0) > try(system("convert tmp/5rk761321397588.ps tmp/5rk761321397588.png",intern=TRUE)) character(0) > try(system("convert tmp/6kafx1321397588.ps tmp/6kafx1321397588.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.774 0.396 2.374