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 = '' x <- c(1050 360 3330 3380 340 1000 960,2700 2730 1670 100 5770 3150 1890,960 1120 2120 450 2250 2320 2400,1320 530 3350 540 3870 1250 2400,1280 5320 4390 2100 2100 3060 4770,3150 5700 5220 500 1850 2460 5850,510 240 396 1419 2109,,,,) par3 = '' par2 = '100' par1 = '1' par3 <- '' par2 <- '100' par1 <- '1' #'GNU S' R Code compiled by R2WASP v. 1.2.327 (Tue, 16 Aug 2016 12:51:43 +0200) #Author: root #To cite this work: Wessa P., (2016), Stem-and-leaf Plot (v1.0.6) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_stem.wasp/ #Source of accompanying publication: # par1 <- as.numeric(par1) par2 <- as.numeric(par2) par3 <- as.numeric(par3) stem(x,par1,par2,par3) a<-table.start() a<-table.row.start(a) a<-table.element(a,'Stem-and-leaf Plot',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,paste('
',RC.texteval('stem(x,par1,par2,par3)'),'',sep='')) a<-table.row.end(a) a<-table.end(a) table.save(a,file="/home/pw/wessanet/rcomp/tmp/126c21613185891.tab")