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. > > 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) + } > x <- c(140824,110459,105079,112098,43929,76173,187326,22807,144408,66485,79089,81625,68788,103297,69446,114948,167949,125081,125818,136588,112431,103037,82317,118906,83515,104581,103129,83243,37110,113344,139165,86652,112302,69652,119442,69867,101629,70168,31081,103925,92622,79011,93487,64520,93473,114360,33032,96125,151911,89256,95676,5950,149695,32551,31701,100087,169707,150491,120192,95893,151715,176225,59900,104767,114799,72128,143592,89626,131072,126817,81351,22618,88977,92059,81897,108146,126372,249771,71154,71571,55918,160141,38692,102812,56622,15986,123534,108535,93879,144551,56750,127654,65594,59938,146975,165904,169265,183500,165986,184923,140358,149959,57224,43750,48029,104978,100046,101047,197426,160902,147172,109432,1168,83248,25162,45724,110529,855,101382,14116,89506,135356,116066,144244,8773,102153,117440,104128,134238,134047,279488,79756,66089,102070,146760,154771,165933,64593,92280,67150,128692,124089,125386,37238,140015,150047,154451,156349) > par3 = '1e-08' > par2 = '80' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2011, 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: > #Technical description: > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > stem(x,par1,par2,par3) The decimal point is 4 digit(s) to the right of the | 0 | 116946 2 | 3351233779 4 | 44686777 6 | 0055666799000122699 8 | 0122233479900223334666 10 | 001122233334455558990122234556799 12 | 0445566789144579 14 | 0014445777000022456 16 | 016668906 18 | 4577 20 | 22 | 24 | 0 26 | 9 > > #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,'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="/var/wessaorg/rcomp/tmp/1ztwe1324642289.tab") > > > > proc.time() user system elapsed 0.198 0.035 0.225