R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(662.883,251.422,171.328,350.089,221.588,4.813,183.186,190.379,223.166,232.669,356.725,109.215,475.834,315.955,694.87,8.95,278.741,308.16,207.533,192.797,601.162,289.714,293.671,386.688,699.645,85.094,131.812,645.285,197.549,308.174,86.58,242.205,238.502,187.881,140.321,440.31,421.403,218.761,1305.923,137.55,262.517,348.821,150.034,64.016,261.596,259.7,171.26,203.077,249.148,211.655,252.64,438.555,239.89,401.915,216.886,184.641,380.155,653.641,313.906,366.936,236.302,229.641,235.577,103.898,263.906,241.171,216.548,295.281,193.299,204.386,257.567,136.813,240.755,59.609,213.511,380.531,242.344,250.407,183.613,191.835,266.793,246.542,330.563,403.556,208.108,324.04,308.532,199.297,200.156,262.875,287.069,190.157,199.746,265.777,435.956,72.844,756.46,206.771,4202.361,401.422,216.046,39.047,441.437) > par3 = '1e-08' > par2 = '80' > par1 = '1' > par3 <- '1e-08' > par2 <- '80' > par1 <- '1' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Stem-and-leaf Plot (v1.0.5) 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) The decimal point is 2 digit(s) to the right of the | 0 | 01466799013444577888999999 2 | 00000011111222222334444444455555666666778999011112235567889 4 | 000244448 6 | 0556906 8 | 10 | 12 | 1 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 0 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/1s7on1348748874.tab") > > > > proc.time() user system elapsed 0.291 0.057 0.326