Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.36 KB | None | 0 0
  1.  
  2. R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
  3. Copyright (C) 2017 The R Foundation for Statistical Computing
  4. Platform: x86_64-pc-linux-gnu (64-bit)
  5.  
  6. R is free software and comes with ABSOLUTELY NO WARRANTY.
  7. You are welcome to redistribute it under certain conditions.
  8. Type 'license()' or 'licence()' for distribution details.
  9.  
  10. R is a collaborative project with many contributors.
  11. Type 'contributors()' for more information and
  12. 'citation()' on how to cite R or R packages in publications.
  13.  
  14. Type 'demo()' for some demos, 'help()' for on-line help, or
  15. 'help.start()' for an HTML browser interface to help.
  16. Type 'q()' to quit R.
  17.  
  18. > source('/home/pw/wessanet/cretab')
  19. >
  20. >
  21. > RC.capture <- function (expression, collapse = NULL) {
  22. + resultConn <- textConnection('RC.resultText', open = 'w', local=TRUE)
  23. + sink(resultConn)
  24. + on.exit(function() {
  25. + sink()
  26. + close(resultConn)
  27. + })
  28. + expression
  29. + on.exit(NULL)
  30. + sink()
  31. + close(resultConn)
  32. + return(paste(c(RC.resultText, ''), collapse = collapse, sep = ''))
  33. + }
  34. > RC.texteval <- function (sourceText, collapse = NULL, echo = TRUE) {
  35. + sourceConn <- textConnection(sourceText, open = 'r')
  36. + on.exit(close(sourceConn))
  37. + result <- RC.capture(source(file = sourceConn, local = FALSE, echo = echo, print.eval = TRUE), collapse = collapse)
  38. + on.exit(NULL)
  39. + close(sourceConn)
  40. + res <- ''
  41. + for(i in 1:length(result)) {
  42. + if (result[i]!='') res <- paste(res,result[i],'
  43. + ',sep='')
  44. + }
  45. + return(res)
  46. + }
  47. >
  48. >
  49. > myrfcuid = 'account3'
  50. >
  51. > x <- c(1.72923686058208,0.122433126801145,0.523768788982079,-0.50175942601324,-1.86386120887019,0.0717422351702872,-0.380578531491989,-0.29851611788274,1.94316215667028,-1.24779901378139,1.35257277275093,2.84406850014719,1.12274878943606,-2.32540657982629,-2.89902363942181,0.246874012745119,-0.731094375584061,1.97769407549524,-0.089308186457892,-1.64931358279907,1.78988776616251,-0.655026882699021,-0.95518008982139,-0.501427837065876,-1.47468882156665,2.4255103110643,-0.388732570521789,-1.41970373897772,-0.435743764210552,0.588337253253952,-1.73087780677345,0.416192838768035,-0.135602934239543,1.5607508968729,-0.619488852927662,0.130061173484127,-0.485714783249833,1.19042117073251,0.504940688912012,-0.266725732456376,1.8987616014054,0.9835731579105,0.221023228988728,-0.176860990484583,-0.162198287814433,0.78911590880292,1.41209201053576,0.518161844628975,2.36462043434148,-1.24446105804486,1.09138861156198,0.422175612267996,-0.997989397904933,0.754650745534752,-1.44375392644115,0.568632265545353,1.35413305240232,-1.34288885715882,-0.0968579661829751,0.242767533935212,0.255744783559028,-0.243232899636027,0.461607264600104,0.0650797112167817,2.25999343044582,1.80462197944889,2.32548979115297,0.682758803307819,-0.335554613197298,-0.997929583796738,0.97507128242145,-1.17268516900173,-0.000337278483281606,-1.71460596672184,-1.34872342854985,-1.6521456119588,-1.48335049731373,0.925016701443022,-0.226525557050897,0.774905929042345,-0.339789522342372,0.89311055438168,-0.864578780222597,-1.95217915873499,-0.11317194501752,1.02470860347022,-1.25650654087286,-0.602130638597027,-0.83233134657693,-0.446577198612737,-4.01053303468812,0.288513333839785,-1.00798474916531,-0.572816189634855,-0.297410570159231,1.21578539483534,-0.727486991378146,-0.843943364912431,-1.20889338911855,-0.649656515850742,3.19984732249364,0.572738529480399,-0.0199646221520179,0.462316869083462,-1.28699501625665,-1.80757939159691,-2.15431670426712,0.707840316820782,1.36410372036211,0.314718394752158,-4.1002515835693,1.26992188862053,1.80144339707427,-0.42970220964945,0.529993653035631,1.18764422512472,-0.398233352310507,-0.421884162222733,-2.6898323919027,1.0140628812162,-0.542058945797581,-0.368690243263354,1.31411524584048,-0.428705333764204,-0.663582558495647,1.37204511801761,-1.27310996987184,0.810157913937622,1.5741305304336,-1.025150115941,-0.998930862337702,-0.0536208441845616,1.66337771592794,-0.178008462116163,-1.09164775518912,1.96797905166753,0.634220496887586,1.38764487483822,0.75570654001001,-2.3214750727902,1.62023993830839,0.423224828517651,-1.7051130142733,0.541981863740972,-0.593027838089475,0.213567450337977,-0.696840242545287,0.0777251570183703,-0.725328497765991,2.1315776363419,-0.33645518676905,-0.979182554450992,-0.242246084610725,-1.82980075345691,-1.14814874978528,0.496126806273696,-0.37803015357093,0.564631359789787,0.268965939275992,0.752661368724124,-2.30203173253409,2.82635859577673,-0.607627712639158,3.77405193258893,1.08426693162876,-2.2508985634727,0.290663952981133,-1.1346060583543,1.41583984485642,0.590041695581542,1.22056539827692,0.0970995178245223,-0.906020145960084,-0.597681226735446,0.437155726246844,0.742487563055592,1.22917286536281,-0.95259160353182,-0.75528682870179)
  52. > par4 = '12'
  53. > par3 = ''
  54. > par2 = ''
  55. > par1 = ''
  56. > ylimmax = ''
  57. > ylimmin = ''
  58. > ylab = 'value'
  59. > xlab = 'index or time'
  60. > main = 'Univariate Data'
  61. > par4 <- '12'
  62. > par3 <- ''
  63. > par2 <- ''
  64. > par1 <- ''
  65. > #'GNU S' R Code compiled by R2WASP v. 1.2.327 (Sat, 08 Jul 2017 19:56:02 +0200)
  66. > #Author: root
  67. > #To cite this work: Wessa P., (2017), Plot of univariate data series (v1.0.6) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_univariatedataseries.wasp/
  68. > #Source of accompanying publication:
  69. > #
  70. > if (par4 != 'No season') {
  71. + par4 <- as.numeric(par4)
  72. + if (par4 < 4) par4 <- 12
  73. + }
  74. > summary(x)
  75. Min. 1st Qu. Median Mean 3rd Qu. Max.
  76. -4.10025 -0.83814 -0.08931 0.00000 0.79964 3.77405
  77. > n <- length(x)
  78. > postscript(file="/home/pw/wessanet/rcomp/tmp/1qxcn1516786537.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
  79. > if (par4=='No season') {
  80. + plot(x,col=2,type='b',main=main,xlab=xlab,ylab=ylab,xaxt='n')
  81. + axis(1,at=seq(1,n,10))
  82. + }
  83. > if (par4!='No season') {
  84. + plot(x,col=2,type='b',main=main,xlab=xlab,ylab=ylab,xaxt='n')
  85. + axis(1,at=seq(1,n,par4))
  86. + grid(nx=0,ny=NULL,col='black')
  87. + abline(v=seq(1,n,par4),col='black',lty='dotted')
  88. + }
  89. > dev.off()
  90. null device
  91. 1
  92. >
  93. > a<-table.start()
  94. > a<-table.row.start(a)
  95. > a<-table.element(a,'Univariate Dataseries',2,TRUE)
  96. > a<-table.row.end(a)
  97. > a<-table.row.start(a)
  98. > a<-table.element(a,'Name of dataseries',header=TRUE)
  99. > a<-table.element(a,par1)
  100. > a<-table.row.end(a)
  101. > a<-table.row.start(a)
  102. > a<-table.element(a,'Source',header=TRUE)
  103. > a<-table.element(a,par2)
  104. > a<-table.row.end(a)
  105. > a<-table.row.start(a)
  106. > a<-table.element(a,'Description',header=TRUE)
  107. > a<-table.element(a,par3)
  108. > a<-table.row.end(a)
  109. > a<-table.row.start(a)
  110. > a<-table.element(a,'Number of observations',header=TRUE)
  111. > a<-table.element(a,length(x))
  112. > a<-table.row.end(a)
  113. > a<-table.end(a)
  114. > table.save(a,file="/home/pw/wessanet/rcomp/tmp/2ai2z1516786537.tab")
  115. > a<-table.start()
  116. > a<-table.row.start(a)
  117. > a<-table.element(a,'Summary Statistics of dataseries x',1,TRUE)
  118. > a<-table.row.end(a)
  119. > a<-table.row.start(a)
  120. > a<-table.element(a,paste('<pre>',RC.texteval('summary(x)'),'</pre>',sep=''))
  121. > a<-table.row.end(a)
  122. > a<-table.end(a)
  123. > table.save(a,file="/home/pw/wessanet/rcomp/tmp/30hgv1516786537.tab")
  124. >
  125. > try(system("convert /home/pw/wessanet/rcomp/tmp/1qxcn1516786537.ps /home/pw/wessanet/rcomp/tmp/1qxcn1516786537.png",intern=TRUE))
  126. character(0)
  127. >
  128. > proc.time()
  129. user system elapsed
  130. 0.924 0.188 1.289
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement