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(315.71 + ,317.45 + ,317.5 + ,317.12 + ,315.86 + ,314.93 + ,313.2 + ,312.6 + ,313.33 + ,314.67 + ,315.62 + ,316.38 + ,316.71 + ,317.72 + ,318.29 + ,318.16 + ,316.55 + ,314.8 + ,313.84 + ,313.26 + ,314.8 + ,315.59 + ,316.43 + ,316.97 + ,317.58 + ,319.02 + ,320.02 + ,319.59 + ,318.18 + ,315.91 + ,314.16 + ,313.83 + ,315 + ,316.19 + ,316.93 + ,317.7 + ,318.54 + ,319.48 + ,320.58 + ,319.77 + ,318.58 + ,316.79 + ,314.8 + ,315.38 + ,316.1 + ,317.01 + ,317.94 + ,318.55 + ,319.68 + ,320.63 + ,321.01 + ,320.55 + ,319.58 + ,317.4 + ,316.26 + ,315.42 + ,316.69 + ,317.7 + ,318.74 + ,319.08 + ,319.86 + ,321.39 + ,322.24 + ,321.47 + ,319.74 + ,317.77 + ,316.21 + ,315.99 + ,317.12 + ,318.31 + ,319.57 + ,320.08 + ,320.75 + ,321.8 + ,322.24 + ,321.89 + ,320.44 + ,318.7 + ,316.7 + ,316.79 + ,317.79 + ,318.71 + ,319.44 + ,320.44 + ,320.89 + ,322.13 + ,322.16 + ,321.87 + ,321.39 + ,318.8 + ,317.81 + ,317.3 + ,318.87 + ,319.42 + ,320.62 + ,321.59 + ,322.39 + ,323.87 + ,324.01 + ,323.75 + ,322.4 + ,320.37 + ,318.64 + ,318.1 + ,319.78 + ,321.08 + ,322.06 + ,322.5 + ,323.04 + ,324.42 + ,325 + ,324.09 + ,322.55 + ,320.92 + ,319.31 + ,319.31 + ,320.72 + ,321.96 + ,322.57 + ,323.15 + ,323.89 + ,325.02 + ,325.57 + ,325.36 + ,324.14 + ,322.03 + ,320.41 + ,320.25 + ,321.31 + ,322.84 + ,324 + ,324.42 + ,325.64 + ,326.66 + ,327.34 + ,326.76 + ,325.88 + ,323.67 + ,322.38 + ,321.78 + ,322.85 + ,324.12 + ,325.03 + ,325.99 + ,326.87 + ,328.14 + ,328.07 + ,327.66 + ,326.35 + ,324.69 + ,323.1 + ,323.16 + ,323.98 + ,325.13 + ,326.17 + ,326.68 + ,327.18 + ,327.78 + ,328.92 + ,328.57 + ,327.34 + ,325.46 + ,323.36 + ,323.56 + ,324.8 + ,326.01 + ,326.77 + ,327.63 + ,327.75 + ,329.72 + ,330.07 + ,329.09 + ,328.05 + ,326.32 + ,324.93 + ,325.06 + ,326.5 + ,327.55 + ,328.55 + ,329.56 + ,330.3 + ,331.5 + ,332.48 + ,332.07 + ,330.87 + ,329.31 + ,327.51 + ,327.18 + ,328.16 + ,328.64 + ,329.35 + ,330.71 + ,331.48 + ,332.65 + ,333.15 + ,332.13 + ,330.99 + ,329.17 + ,327.41 + ,327.21 + ,328.34 + ,329.5 + ,330.68 + ,331.41 + ,331.85 + ,333.29 + ,333.91 + ,333.4 + ,331.74 + ,329.88 + ,328.57 + ,328.35 + ,329.33 + ,330.58 + ,331.66 + ,332.75 + ,333.46 + ,334.78 + ,334.79 + ,334.05 + ,332.95 + ,330.64 + ,328.96 + ,328.77 + ,330.18 + ,331.65 + ,332.69 + ,333.23 + ,334.97 + ,336.03 + ,336.82 + ,336.1 + ,334.79 + ,332.53 + ,331.19 + ,331.21 + ,332.35 + ,333.47 + ,335.09 + ,335.26 + ,336.62 + ,337.77 + ,338 + ,337.98 + ,336.48 + ,334.37 + ,332.33 + ,332.4 + ,333.76 + ,334.83 + ,336.21 + ,336.64 + ,338.13 + ,338.96 + ,339.02 + ,339.2 + ,337.6 + ,335.56 + ,333.93 + ,334.12 + ,335.26 + ,336.77 + ,337.8 + ,338.28 + ,340.04 + ,340.86 + ,341.47 + ,341.26 + ,339.34 + ,337.45 + ,336.1 + ,336.05 + ,337.21 + ,338.29 + ,339.36 + ,340.51 + ,341.57 + ,342.56 + ,343.01 + ,342.52 + ,340.71 + ,338.51 + ,336.96 + ,337.13 + ,338.58 + ,339.91 + ,340.92 + ,341.69 + ,342.87 + ,343.83 + ,344.3 + ,343.42 + ,341.85 + ,339.82 + ,337.98 + ,338.09 + ,339.24 + ,340.67 + ,341.42 + ,342.67) > par4 = '12' > par3 = '0' > par2 = '0' > 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/1l53s1324572047.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/2nvhc1324572047.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/33f7f1324572047.tab") > > try(system("convert tmp/1l53s1324572047.ps tmp/1l53s1324572047.png",intern=TRUE)) character(0) > try(system("convert tmp/2nvhc1324572047.ps tmp/2nvhc1324572047.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.811 0.144 0.952