R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(11974 + ,10106 + ,12069 + ,11412 + ,11180 + ,10508 + ,11288 + ,10928 + ,10199 + ,11030 + ,11234 + ,13747 + ,13912 + ,12376 + ,12264 + ,11675 + ,11271 + ,10672 + ,10933 + ,10379 + ,10187 + ,10747 + ,10970 + ,12175 + ,14200 + ,11676 + ,11258 + ,10872 + ,11148 + ,10690 + ,10684 + ,11658 + ,10178 + ,10981 + ,10773 + ,11665 + ,11359 + ,10716 + ,12928 + ,12317 + ,11641 + ,10459 + ,10953 + ,10703 + ,10703 + ,11101 + ,11334 + ,13268 + ,13145 + ,12334 + ,13153 + ,11289 + ,11374 + ,10914 + ,11299 + ,11284 + ,10694 + ,11077 + ,11104 + ,12820 + ,14915 + ,11773 + ,11608 + ,11468 + ,11511 + ,11200 + ,11164 + ,10960 + ,10667 + ,11556 + ,11372 + ,12333 + ,13102 + ,11115 + ,12572 + ,11557 + ,12059 + ,11420 + ,11185 + ,11113 + ,10706 + ,11523 + ,11391 + ,12634 + ,13469 + ,11735 + ,13281 + ,11968 + ,11623 + ,11084 + ,11509 + ,11134 + ,10438 + ,11530 + ,11491 + ,13093 + ,13106 + ,11305 + ,13113 + ,12203 + ,11309 + ,11088 + ,11234 + ,11619 + ,10942 + ,11445 + ,11291 + ,13281 + ,13726 + ,11300 + ,11983 + ,11092 + ,11093 + ,10692 + ,10786 + ,11166 + ,10553 + ,11103 + ,10969 + ,12090 + ,12544 + ,12264 + ,13783 + ,11214 + ,11453 + ,10883 + ,10381 + ,10348 + ,10024 + ,10805 + ,10796 + ,11907 + ,12261 + ,11377 + ,12689 + ,11474 + ,10992 + ,10764 + ,12164 + ,10409 + ,10398 + ,10349 + ,10865 + ,11630 + ,12221 + ,10884 + ,12019 + ,11021 + ,10799 + ,10423 + ,10484 + ,10450 + ,9906 + ,11049 + ,11281 + ,12485 + ,12849 + ,11380 + ,12079 + ,11366 + ,11328 + ,10444 + ,10854 + ,10434 + ,10137 + ,10992 + ,10906 + ,12367 + ,14371 + ,11695 + ,11546 + ,10922 + ,10670 + ,10254 + ,10573 + ,10239 + ,10253 + ,11176 + ,10719 + ,11817) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '1' > par1 = 'FALSE' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > if (par1 == 'TRUE') par1 <- TRUE > if (par1 == 'FALSE') par1 <- FALSE > par2 <- as.numeric(par2) #Box-Cox lambda transformation parameter > par3 <- as.numeric(par3) #degree of non-seasonal differencing > par4 <- as.numeric(par4) #degree of seasonal differencing > par5 <- as.numeric(par5) #seasonal period > par6 <- as.numeric(par6) #degree (p) of the non-seasonal AR(p) polynomial > par7 <- as.numeric(par7) #degree (q) of the non-seasonal MA(q) polynomial > par8 <- as.numeric(par8) #degree (P) of the seasonal AR(P) polynomial > par9 <- as.numeric(par9) #degree (Q) of the seasonal MA(Q) polynomial > armaGR <- function(arima.out, names, n){ + try1 <- arima.out$coef + try2 <- sqrt(diag(arima.out$var.coef)) + try.data.frame <- data.frame(matrix(NA,ncol=4,nrow=length(names))) + dimnames(try.data.frame) <- list(names,c('coef','std','tstat','pv')) + try.data.frame[,1] <- try1 + for(i in 1:length(try2)) try.data.frame[which(rownames(try.data.frame)==names(try2)[i]),2] <- try2[i] + try.data.frame[,3] <- try.data.frame[,1] / try.data.frame[,2] + try.data.frame[,4] <- round((1-pt(abs(try.data.frame[,3]),df=n-(length(try2)+1)))*2,5) + vector <- rep(NA,length(names)) + vector[is.na(try.data.frame[,4])] <- 0 + maxi <- which.max(try.data.frame[,4]) + continue <- max(try.data.frame[,4],na.rm=TRUE) > .05 + vector[maxi] <- 0 + list(summary=try.data.frame,next.vector=vector,continue=continue) + } > arimaSelect <- function(series, order=c(13,0,0), seasonal=list(order=c(2,0,0),period=12), include.mean=F){ + nrc <- order[1]+order[3]+seasonal$order[1]+seasonal$order[3] + coeff <- matrix(NA, nrow=nrc*2, ncol=nrc) + pval <- matrix(NA, nrow=nrc*2, ncol=nrc) + mylist <- rep(list(NULL), nrc) + names <- NULL + if(order[1] > 0) names <- paste('ar',1:order[1],sep='') + if(order[3] > 0) names <- c( names , paste('ma',1:order[3],sep='') ) + if(seasonal$order[1] > 0) names <- c(names, paste('sar',1:seasonal$order[1],sep='')) + if(seasonal$order[3] > 0) names <- c(names, paste('sma',1:seasonal$order[3],sep='')) + arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML') + mylist[[1]] <- arima.out + last.arma <- armaGR(arima.out, names, length(series)) + mystop <- FALSE + i <- 1 + coeff[i,] <- last.arma[[1]][,1] + pval [i,] <- last.arma[[1]][,4] + i <- 2 + aic <- arima.out$aic + while(!mystop){ + mylist[[i]] <- arima.out + arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML', fixed=last.arma$next.vector) + aic <- c(aic, arima.out$aic) + last.arma <- armaGR(arima.out, names, length(series)) + mystop <- !last.arma$continue + coeff[i,] <- last.arma[[1]][,1] + pval [i,] <- last.arma[[1]][,4] + i <- i+1 + } + list(coeff, pval, mylist, aic=aic) + } > arimaSelectplot <- function(arimaSelect.out,noms,choix){ + noms <- names(arimaSelect.out[[3]][[1]]$coef) + coeff <- arimaSelect.out[[1]] + k <- min(which(is.na(coeff[,1])))-1 + coeff <- coeff[1:k,] + pval <- arimaSelect.out[[2]][1:k,] + aic <- arimaSelect.out$aic[1:k] + coeff[coeff==0] <- NA + n <- ncol(coeff) + if(missing(choix)) choix <- k + layout(matrix(c(1,1,1,2, + 3,3,3,2, + 3,3,3,4, + 5,6,7,7),nr=4), + widths=c(10,35,45,15), + heights=c(30,30,15,15)) + couleurs <- rainbow(75)[1:50]#(50) + ticks <- pretty(coeff) + par(mar=c(1,1,3,1)) + plot(aic,k:1-.5,type='o',pch=21,bg='blue',cex=2,axes=F,lty=2,xpd=NA) + points(aic[choix],k-choix+.5,pch=21,cex=4,bg=2,xpd=NA) + title('aic',line=2) + par(mar=c(3,0,0,0)) + plot(0,axes=F,xlab='',ylab='',xlim=range(ticks),ylim=c(.1,1)) + rect(xleft = min(ticks) + (0:49)/50*(max(ticks)-min(ticks)), + xright = min(ticks) + (1:50)/50*(max(ticks)-min(ticks)), + ytop = rep(1,50), + ybottom= rep(0,50),col=couleurs,border=NA) + axis(1,ticks) + rect(xleft=min(ticks),xright=max(ticks),ytop=1,ybottom=0) + text(mean(coeff,na.rm=T),.5,'coefficients',cex=2,font=2) + par(mar=c(1,1,3,1)) + image(1:n,1:k,t(coeff[k:1,]),axes=F,col=couleurs,zlim=range(ticks)) + for(i in 1:n) for(j in 1:k) if(!is.na(coeff[j,i])) { + if(pval[j,i]<.01) symb = 'green' + else if( (pval[j,i]<.05) & (pval[j,i]>=.01)) symb = 'orange' + else if( (pval[j,i]<.1) & (pval[j,i]>=.05)) symb = 'red' + else symb = 'black' + polygon(c(i+.5 ,i+.2 ,i+.5 ,i+.5), + c(k-j+0.5,k-j+0.5,k-j+0.8,k-j+0.5), + col=symb) + if(j==choix) { + rect(xleft=i-.5, + xright=i+.5, + ybottom=k-j+1.5, + ytop=k-j+.5, + lwd=4) + text(i, + k-j+1, + round(coeff[j,i],2), + cex=1.2, + font=2) + } + else{ + rect(xleft=i-.5,xright=i+.5,ybottom=k-j+1.5,ytop=k-j+.5) + text(i,k-j+1,round(coeff[j,i],2),cex=1.2,font=1) + } + } + axis(3,1:n,noms) + par(mar=c(0.5,0,0,0.5)) + plot(0,axes=F,xlab='',ylab='',type='n',xlim=c(0,8),ylim=c(-.2,.8)) + cols <- c('green','orange','red','black') + niv <- c('0','0.01','0.05','0.1') + for(i in 0:3){ + polygon(c(1+2*i ,1+2*i ,1+2*i-.5 ,1+2*i), + c(.4 ,.7 , .4 , .4), + col=cols[i+1]) + text(2*i,0.5,niv[i+1],cex=1.5) + } + text(8,.5,1,cex=1.5) + text(4,0,'p-value',cex=2) + box() + residus <- arimaSelect.out[[3]][[choix]]$res + par(mar=c(1,2,4,1)) + acf(residus,main='') + title('acf',line=.5) + par(mar=c(1,2,4,1)) + pacf(residus,main='') + title('pacf',line=.5) + par(mar=c(2,2,4,1)) + qqnorm(residus,main='') + title('qq-norm',line=.5) + qqline(residus) + residus + } > if (par2 == 0) x <- log(x) > if (par2 != 0) x <- x^par2 > (selection <- arimaSelect(x, order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5))) [[1]] [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.29667884 -0.4774298 0.1742861 -0.8709851 -0.19934297 -0.2875588 [2,] -0.35518506 0.3758041 0.0000000 0.8669052 -0.09305174 -0.2046078 [3,] 0.04761182 0.1513005 0.0000000 0.4596197 0.00000000 -0.1615271 [4,] 0.00000000 0.1755355 0.0000000 0.5063807 0.00000000 -0.1625518 [5,] 0.00000000 0.1405874 0.0000000 0.5082637 0.00000000 0.0000000 [6,] 0.00000000 0.0000000 0.0000000 0.4607723 0.00000000 0.0000000 [7,] NA NA NA NA NA NA [8,] NA NA NA NA NA NA [9,] NA NA NA NA NA NA [10,] NA NA NA NA NA NA [11,] NA NA NA NA NA NA [12,] NA NA NA NA NA NA [13,] NA NA NA NA NA NA [14,] NA NA NA NA NA NA [,7] [1,] -0.9999625 [2,] -0.8807476 [3,] -0.9995428 [4,] -0.9998618 [5,] -0.9999976 [6,] -1.0000022 [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA [13,] NA [14,] NA [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.00000 0.00020 0.03556 0.00000 0.01895 0.00071 0e+00 [2,] 0.08132 0.00447 NA 0.00000 0.44600 0.07186 1e-05 [3,] 0.95176 0.71020 NA 0.55254 NA 0.06310 0e+00 [4,] NA 0.05036 NA 0.00000 NA 0.05718 0e+00 [5,] NA 0.11622 NA 0.00000 NA NA 0e+00 [6,] NA NA NA 0.00000 NA NA 0e+00 [7,] NA NA NA NA NA NA NA [8,] NA NA NA NA NA NA NA [9,] NA NA NA NA NA NA NA [10,] NA NA NA NA NA NA NA [11,] NA NA NA NA NA NA NA [12,] NA NA NA NA NA NA NA [13,] NA NA NA NA NA NA NA [14,] NA NA NA NA NA NA NA [[3]] [[3]][[1]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 1.2967 -0.4774 0.1743 -0.8710 -0.1993 -0.2876 -1.0000 s.e. 0.0939 0.1254 0.0823 0.0507 0.0841 0.0834 0.1437 sigma^2 estimated as 186003: log likelihood = -1278.13, aic = 2572.27 [[3]][[2]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 1.2967 -0.4774 0.1743 -0.8710 -0.1993 -0.2876 -1.0000 s.e. 0.0939 0.1254 0.0823 0.0507 0.0841 0.0834 0.1437 sigma^2 estimated as 186003: log likelihood = -1278.13, aic = 2572.27 [[3]][[3]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 -0.3552 0.3758 0 0.8669 -0.0931 -0.2046 -0.8807 s.e. 0.2026 0.1305 0 0.1794 0.1218 0.1130 0.1944 sigma^2 estimated as 225797: log likelihood = -1286.08, aic = 2586.16 [[3]][[4]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 0.0476 0.1513 0 0.4596 0 -0.1615 -0.9995 s.e. 0.7859 0.4065 0 0.7723 0 0.0864 0.1851 sigma^2 estimated as 211540: log likelihood = -1286.63, aic = 2585.27 [[3]][[5]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 0 0.1755 0 0.5064 0 -0.1626 -0.9999 s.e. 0 0.0891 0 0.0749 0 0.0849 0.1862 sigma^2 estimated as 211443: log likelihood = -1286.64, aic = 2583.27 [[3]][[6]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 0 0.1406 0 0.5083 0 0 -1.0000 s.e. 0 0.0891 0 0.0740 0 0 0.0982 sigma^2 estimated as 220817: log likelihood = -1288.39, aic = 2584.78 [[3]][[7]] NULL $aic [1] 2572.265 2586.163 2585.268 2583.272 2584.779 2585.358 Warning messages: 1: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 2: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 3: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 4: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 5: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE > postscript(file="/var/www/rcomp/tmp/1n57y1293596962.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > resid <- arimaSelectplot(selection) > dev.off() null device 1 > resid Time Series: Start = 1 End = 180 Frequency = 1 [1] 11.973985 10.105973 12.068968 11.411965 11.179966 [6] 10.507966 11.287966 10.927966 10.198968 11.029968 [11] 11.233970 13.746973 1209.509343 968.398194 -543.390012 [16] 236.129489 -74.718968 128.506322 -323.493075 -235.131480 [21] 159.598401 -191.593279 5.932114 -861.290079 1389.353751 [26] -242.835878 -762.508433 -210.678062 148.302722 83.972558 [31] -380.463987 1006.382767 -463.794911 226.595340 -304.014004 [36] -706.327716 -1349.561474 220.532765 1053.446059 409.975063 [41] 44.360628 -286.031566 79.072190 -265.495664 587.784472 [46] -93.955094 316.426110 552.280926 -64.942419 929.463259 [51] 407.276726 -597.644884 232.414537 214.018541 182.942277 [56] 195.016982 200.340401 -37.213390 24.082844 142.981370 [61] 1736.490457 -604.170185 -612.338791 227.637726 149.423287 [66] 433.435825 -122.765454 -34.377324 255.834938 405.505704 [71] 54.710057 -380.471668 12.383539 -321.023577 514.567429 [76] -164.111446 689.353945 272.230177 -107.827079 86.028945 [81] 191.037764 305.025412 77.427837 -53.812262 213.355469 [86] 159.157346 838.400513 -38.832184 43.421866 148.777126 [91] 311.251023 -67.282004 -55.715335 380.661812 137.174840 [96] 349.124913 -365.985025 -43.634128 722.636990 252.824203 [101] -381.386927 317.138868 -37.662088 556.045372 149.676632 [106] 90.168103 -9.900547 562.464726 160.184952 -315.619396 [111] -367.764949 -311.759814 -121.935676 -55.241417 -257.624181 [116] 234.273501 -41.606562 -93.844369 -173.100756 -496.552440 [121] -429.852288 1084.596358 845.677749 -893.788447 302.618253 [126] -94.087299 -645.032078 -384.286687 -184.831119 -185.020605 [131] -200.630146 -564.650885 -583.681545 262.407824 132.505624 [136] -122.569603 -370.270307 93.773767 1088.979768 -1129.218351 [141] 344.860015 -875.203107 190.587562 -912.705171 -385.464331 [146] -272.202643 -255.397445 -289.628314 -345.629837 -177.625502 [151] -452.201443 -214.355352 -347.662206 199.525023 130.118332 [156] -91.474173 -189.958853 25.388412 -404.697474 82.623446 [161] 3.355872 -355.298673 -36.782787 -410.822985 -41.483923 [166] -10.636830 -173.073544 -42.208105 1321.731253 -417.746394 [171] -874.063728 -142.045549 -448.879041 -224.274322 -270.454030 [176] -424.927166 133.317041 107.333305 -416.291598 -463.497466 > postscript(file="/var/www/rcomp/tmp/2n57y1293596962.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(resid,length(resid)/2, main='Residual Autocorrelation Function') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3n57y1293596962.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(resid,length(resid)/2, main='Residual Partial Autocorrelation Function') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/4ywoj1293596962.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > cpgram(resid, main='Residual Cumulative Periodogram') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5ywoj1293596962.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(resid, main='Residual Histogram', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6ywoj1293596962.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7ywoj1293596962.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(resid, main='Residual Normal Q-Q Plot') > qqline(resid) > dev.off() null device 1 > ncols <- length(selection[[1]][1,]) > nrows <- length(selection[[2]][,1])-1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'ARIMA Parameter Estimation and Backward Selection', ncols+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Iteration', header=TRUE) > for (i in 1:ncols) { + a<-table.element(a,names(selection[[3]][[1]]$coef)[i],header=TRUE) + } > a<-table.row.end(a) > for (j in 1:nrows) { + a<-table.row.start(a) + mydum <- 'Estimates (' + mydum <- paste(mydum,j) + mydum <- paste(mydum,')') + a<-table.element(a,mydum, header=TRUE) + for (i in 1:ncols) { + a<-table.element(a,round(selection[[1]][j,i],4)) + } + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'(p-val)', header=TRUE) + for (i in 1:ncols) { + mydum <- '(' + mydum <- paste(mydum,round(selection[[2]][j,i],4),sep='') + mydum <- paste(mydum,')') + a<-table.element(a,mydum) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/85y3v1293596962.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Estimated ARIMA Residuals', 1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Value', 1,TRUE) > a<-table.row.end(a) > for (i in (par4*par5+par3):length(resid)) { + a<-table.row.start(a) + a<-table.element(a,resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/9xpkg1293596962.tab") > > try(system("convert tmp/1n57y1293596962.ps tmp/1n57y1293596962.png",intern=TRUE)) character(0) > try(system("convert tmp/2n57y1293596962.ps tmp/2n57y1293596962.png",intern=TRUE)) character(0) > try(system("convert tmp/3n57y1293596962.ps tmp/3n57y1293596962.png",intern=TRUE)) character(0) > try(system("convert tmp/4ywoj1293596962.ps tmp/4ywoj1293596962.png",intern=TRUE)) character(0) > try(system("convert tmp/5ywoj1293596962.ps tmp/5ywoj1293596962.png",intern=TRUE)) character(0) > try(system("convert tmp/6ywoj1293596962.ps tmp/6ywoj1293596962.png",intern=TRUE)) character(0) > try(system("convert tmp/7ywoj1293596962.ps tmp/7ywoj1293596962.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 13.460 7.420 20.891