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(4.69,4.88,4.84,4.81,5.22,5.16,5.27,5.35,5.33,5.29,5.28,4.94,4.70,4.73,4.57,4.61,4.69,4.53,4.55,4.31,4.03,3.72,3.64,3.81,3.95,4.26,4.55,4.54,4.55,4.39,4.21,4.00,3.67,3.60,3.53,3.35,3.10,2.89,2.97,3.03,2.71,2.44,2.60,2.93,2.86,2.88,3.00,2.90,2.64,2.75,2.70,2.87,3.03,3.14,3.02,2.86,3.07,2.93,2.83,2.72,2.73,2.72,2.77,2.61,2.47,2.30,2.38,2.43,2.39,2.60,2.84,2.87,2.92,3.08,3.33,3.48,3.57,3.66,3.77,3.75,3.75,3.81,3.82,3.89,4.05,4.10,4.07,4.26,4.40,4.61,4.63,4.48,4.46,4.45,4.32,4.52,4.21,3.97,4.12,4.50,4.73,5.26,5.20,4.94,4.95,4.52,3.85,3.41,2.95,2.68,2.53,2.44,2.16,2.20,2.10,2.29,2.03,2.05,1.94,1.87,1.89,1.94,1.79,1.71,1.66,1.74,1.83,1.64,1.69,1.78,1.89,1.95,2.05,2.24,2.38,2.53,2.36,2.22,2.12,1.75,1.76,1.81,1.71,1.74,1.48,1.24,1.16,1.11,0.98,0.94,0.65,0.42,0.41,0.40) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '12' > par3 = '0' > par2 = '1' > par1 = '1' > par4 <- '12' > par3 <- '1' > 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/1wwlb1354734586.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/2ux2n1354734586.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/38oqr1354734586.tab") > > try(system("convert tmp/1wwlb1354734586.ps tmp/1wwlb1354734586.png",intern=TRUE)) character(0) > try(system("convert tmp/2ux2n1354734586.ps tmp/2ux2n1354734586.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.393 0.309 1.681