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(8.64 + ,8.89 + ,8.87 + ,8.81 + ,8.87 + ,9.06 + ,9.12 + ,8.66 + ,8.17 + ,8.04 + ,7.71 + ,7.55 + ,7.52 + ,7.38 + ,7.52 + ,7.31 + ,6.92 + ,7.09 + ,7.05 + ,7.37 + ,7.05 + ,6.79 + ,6.35 + ,6.44 + ,6.89 + ,7.16 + ,7.46 + ,7.91 + ,7.86 + ,8.02 + ,8.38 + ,8.50 + ,8.40 + ,8.24 + ,8.33 + ,8.28 + ,8.15 + ,8.06 + ,7.79 + ,7.28 + ,7.52 + ,7.23 + ,7.13 + ,7.21 + ,6.99 + ,6.77 + ,6.69 + ,6.39 + ,6.85 + ,6.74 + ,6.56 + ,6.62 + ,6.71 + ,6.67 + ,6.54 + ,6.14 + ,6.13 + ,5.86 + ,5.88 + ,5.75 + ,5.53 + ,5.86 + ,5.90 + ,5.95 + ,5.69 + ,5.53 + ,5.71 + ,5.60 + ,5.73 + ,5.60 + ,5.41 + ,5.13 + ,5.00 + ,5.04 + ,5.10 + ,4.96 + ,4.90 + ,4.80 + ,4.48 + ,4.29 + ,4.27 + ,4.18 + ,4.02 + ,3.82 + ,4.13 + ,4.16 + ,3.98 + ,4.26 + ,4.70 + ,4.96 + ,5.13 + ,5.35 + ,5.41 + ,5.42 + ,5.51 + ,5.75 + ,5.67 + ,5.46 + ,5.56 + ,5.56 + ,5.54 + ,5.53 + ,5.65 + ,5.58 + ,5.57 + ,5.36 + ,5.23 + ,5.11 + ,5.07 + ,5.04 + ,5.34 + ,5.43 + ,5.31 + ,5.12 + ,4.97 + ,5.00 + ,4.64 + ,4.80 + ,5.10 + ,5.11 + ,5.12 + ,5.36 + ,5.26 + ,5.27 + ,5.10 + ,4.94 + ,4.68 + ,4.41 + ,4.60 + ,4.53 + ,4.18 + ,4.00 + ,3.87 + ,4.09 + ,4.13 + ,3.74 + ,3.81 + ,4.11 + ,4.14 + ,3.99 + ,4.28 + ,4.37 + ,4.24 + ,4.19 + ,4.01 + ,3.95 + ,4.30 + ,4.37 + ,4.40 + ,4.29 + ,4.12 + ,4.07 + ,3.93 + ,3.79 + ,3.67 + ,3.53 + ,3.69 + ,3.69 + ,3.48 + ,3.31 + ,3.16 + ,3.25 + ,3.14 + ,3.19 + ,3.43 + ,3.45 + ,3.31 + ,3.51 + ,3.53 + ,3.83 + ,4.02 + ,3.99 + ,4.11 + ,3.96 + ,3.83 + ,3.71 + ,3.81 + ,3.73 + ,3.99 + ,4.17 + ,4.00 + ,4.10 + ,4.24 + ,4.45 + ,4.62 + ,4.49 + ,4.45 + ,4.49 + ,4.36 + ,4.32 + ,4.45 + ,4.13 + ,4.14 + ,4.30 + ,4.42 + ,4.67 + ,4.96 + ,4.73 + ,4.52 + ,4.36 + ,4.15 + ,3.92 + ,3.88 + ,4.20 + ,3.95 + ,3.78 + ,3.69 + ,3.77 + ,3.66 + ,3.53 + ,3.50 + ,3.14 + ,3.42 + ,3.30 + ,2.81 + ,3.15 + ,3.37 + ,4.05 + ,4.00 + ,4.20 + ,4.21 + ,4.24 + ,4.24 + ,4.17 + ,4.12 + ,4.35 + ,3.98 + ,3.62 + ,4.39 + ,5.01 + ,4.07 + ,3.70 + ,3.59 + ,3.44 + ,3.33 + ,2.98 + ,3.14 + ,2.55 + ,2.49 + ,2.53 + ,2.43) > par4 = '1' > par3 = '0' > par2 = '1' > par1 = '1' > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > par4 <- as.numeric(par4) > if (par1 == 0) { + x <- log(x) + } else { + x <- (x ^ par1 - 1) / par1 + } > if (par2 > 0) x <- diff(x,lag=1,difference=par2) > if (par3 > 0) x <- diff(x,lag=par4,difference=par3) > postscript(file="/var/wessaorg/rcomp/tmp/1d0fc1354193347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > r <- spectrum(x,main='Raw Periodogram') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2cx4y1354193347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > cpgram(x,main='Cumulative Periodogram') > dev.off() null device 1 > > #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,'Raw Periodogram',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'Value',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Box-Cox transformation parameter (lambda)',header=TRUE) > a<-table.element(a,par1) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Degree of non-seasonal differencing (d)',header=TRUE) > a<-table.element(a,par2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Degree of seasonal differencing (D)',header=TRUE) > a<-table.element(a,par3) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Seasonal Period (s)',header=TRUE) > a<-table.element(a,par4) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Frequency (Period)',header=TRUE) > a<-table.element(a,'Spectrum',header=TRUE) > a<-table.row.end(a) > for (i in 1:length(r$freq)) { + a<-table.row.start(a) + mylab <- round(r$freq[i],4) + mylab <- paste(mylab,' (',sep='') + mylab <- paste(mylab,round(1/r$freq[i],4),sep='') + mylab <- paste(mylab,')',sep='') + a<-table.element(a,mylab,header=TRUE) + a<-table.element(a,round(r$spec[i],6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3q1of1354193347.tab") > > try(system("convert tmp/1d0fc1354193347.ps tmp/1d0fc1354193347.png",intern=TRUE)) character(0) > try(system("convert tmp/2cx4y1354193347.ps tmp/2cx4y1354193347.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.938 0.403 2.313