source('/home/pw/wessanet/cretab')


RC.capture <- function (expression, collapse = NULL) {
    resultConn <- textConnection('RC.resultText', open = 'w', local=TRUE)
    sink(resultConn)
    on.exit(function() {
        sink()
        close(resultConn)
    })
    expression
    on.exit(NULL)
    sink()
    close(resultConn)
    return(paste(c(RC.resultText, ''), collapse = collapse, sep = ''))
}
RC.texteval <- function (sourceText, collapse = NULL, echo = TRUE) {
    sourceConn <- textConnection(sourceText, open = 'r')
    on.exit(close(sourceConn))
    result <- RC.capture(source(file = sourceConn, local = FALSE, echo = echo, print.eval = TRUE), collapse = collapse)
    on.exit(NULL)
    close(sourceConn)
    res <- ''
    for(i in 1:length(result)) {
      if (result[i]!='') res <- paste(res,result[i],'
',sep='')
    }
    return(res)
}


myrfcuid = 'r0666116'

x <- c(2973.66,3100.21,2997.06,2848.63,2778,2906.69,2842.44,2731.06,2807.5,2961.31,2834.46,2487.13,2372.74,2618.44,2564.18,2379.94,2556.62,2800.82,2718.07,2622.63,4315.77,4582.99,4656.31,4572.72,4793.4,5109.75,5277.5,5332.15,5470.3,5615.8,5616.25,5824.7,5811.4,5974.85,6037.55,5722.8,6080.4)
par4 = '12'
par3 = ''
par2 = ''
par1 = ''
ylimmax = ''
ylimmin = ''
ylab = 'value'
xlab = 'index or time'
main = 'Univariate Data'
par4 <- '12'
par3 <- ''
par2 <- ''
par1 <- ''
#'GNU S' R Code compiled by R2WASP v. 1.2.327 (Sat, 03 Sep 2016 21:44:04 +0200)
#Author: root
#To cite this work: Wessa P., (2016), Plot of univariate data series (v1.0.5) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_univariatedataseries.wasp/
#Source of accompanying publication: 
#
if (par4 != 'No season') {
par4 <- as.numeric(par4)
if (par4 < 4) par4 <- 12
}
summary(x)
n <- length(x)
postscript(file="/home/pw/wessanet/rcomp/tmp/19cno1481709386.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
if (par4=='No season') {
plot(x,col=2,type='b',main=main,xlab=xlab,ylab=ylab,xaxt='n')
axis(1,at=seq(1,n,10))
}
if (par4!='No season') {
plot(x,col=2,type='b',main=main,xlab=xlab,ylab=ylab,xaxt='n')
axis(1,at=seq(1,n,par4))
grid(nx=0,ny=NULL,col='black')
abline(v=seq(1,n,par4),col='black',lty='dotted')
}
dev.off()

a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate Dataseries',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Name of dataseries',header=TRUE)
a<-table.element(a,par1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Source',header=TRUE)
a<-table.element(a,par2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,par3)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Number of observations',header=TRUE)
a<-table.element(a,length(x))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file="/home/pw/wessanet/rcomp/tmp/2tf0b1481709386.tab") 
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Summary Statistics of dataseries x',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,paste('<pre>',RC.texteval('summary(x)'),'</pre>',sep=''))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file="/home/pw/wessanet/rcomp/tmp/3bqr41481709386.tab") 

try(system("convert /home/pw/wessanet/rcomp/tmp/19cno1481709386.ps /home/pw/wessanet/rcomp/tmp/19cno1481709386.png",intern=TRUE))
