R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(0.69 + ,0.81 + ,0.49 + ,0.54 + ,0.64 + ,0.81 + ,0.51 + ,0.21 + ,0.21 + ,0.64 + ,0.52 + ,0.61 + ,0.44 + ,0.44 + ,0.36 + ,0.53 + ,0.47 + ,0.59 + ,0.48 + ,0.70 + ,0.52 + ,0.56 + ,0.37 + ,0.64 + ,0.59 + ,0.49 + ,0.57 + ,0.58 + ,0.59 + ,0.43 + ,0.81 + ,0.70 + ,0.48 + ,0.63 + ,0.32 + ,0.58 + ,0.65 + ,0.40 + ,0.49 + ,0.27 + ,0.51 + ,0.55 + ,0.33 + ,0.51 + ,0.45 + ,0.46 + ,0.29 + ,0.71 + ,0.42 + ,0.67 + ,0.22 + ,0.72 + ,0.51 + ,0.58 + ,0.58 + ,0.76 + ,0.62 + ,0.47 + ,0.39 + ,0.45 + ,0.47 + ,0.66 + ,0.46 + ,0.43 + ,0.70 + ,0.68 + ,0.29 + ,0.58 + ,0.78 + ,0.43 + ,0.46 + ,0.66 + ,0.67 + ,0.50 + ,0.58 + ,0.45 + ,0.62 + ,0.48 + ,0.32 + ,0.48 + ,0.50 + ,0.51 + ,0.34 + ,0.54 + ,0.70 + ,0.49 + ,0.45 + ,0.51 + ,0.38 + ,0.47 + ,0.55 + ,0.69 + ,0.20 + ,0.59 + ,0.51 + ,0.37 + ,0.54 + ,0.49 + ,0.43 + ,0.53 + ,0.51 + ,0.35 + ,0.50 + ,0.58 + ,0.75 + ,0.78 + ,0.55 + ,0.37 + ,0.60 + ,0.45 + ,0.72 + ,0.44 + ,0.45 + ,0.49 + ,0.70 + ,0.54 + ,0.50 + ,0.38 + ,1.54 + ,0.32 + ,0.48 + ,0.37 + ,0.38 + ,0.68 + ,0.65 + ,0.46 + ,0.41 + ,0.50 + ,0.43 + ,0.25 + ,0.06 + ,0.55 + ,0.40 + ,0.36 + ,0.42 + ,0.66 + ,0.31 + ,0.55 + ,0.51 + ,0.42 + ,0.39 + ,0.55 + ,0.11 + ,0.58 + ,0.37 + ,0.22 + ,0.16 + ,0.62 + ,0.37 + ,0.43 + ,0.49 + ,0.65 + ,0.42 + ,0.52 + ,0.72 + ,0.61 + ,0.63 + ,0.32 + ,0.64 + ,0.34 + ,0.49 + ,0.08 + ,0.41 + ,0.38 + ,0.41 + ,0.63 + ,0.52 + ,0.32 + ,0.67 + ,0.36 + ,0.34 + ,0.57 + ,0.06 + ,0.47 + ,0.56 + ,0.42 + ,0.61 + ,0.28 + ,0.62 + ,0.39 + ,0.32 + ,0.21 + ,0.54 + ,0.49 + ,0.54 + ,0.59 + ,0.46 + ,0.44 + ,0.50 + ,0.15 + ,0.35 + ,0.31 + ,0.37 + ,0.37 + ,0.69 + ,0.35 + ,0.37 + ,0.55 + ,0.41 + ,0.39 + ,0.48 + ,0.34 + ,0.27 + ,0.51 + ,0.32 + ,0.30 + ,0.33 + ,0.37 + ,0.35 + ,0.43 + ,0.48 + ,0.29 + ,0.41 + ,0.56 + ,0.13 + ,0.39 + ,0.49 + ,0.57 + ,0.58 + ,0.40 + ,0.53 + ,0.91 + ,0.45 + ,0.64 + ,0.13 + ,0.33 + ,0.45 + ,0.44 + ,0.23 + ,0.39 + ,0.15 + ,0.52 + ,0.74 + ,0.44 + ,0.39 + ,0.40 + ,0.26 + ,0.59 + ,0.44 + ,0.28 + ,0.43 + ,0.44 + ,0.38 + ,0.39 + ,0.52 + ,0.48 + ,0.47 + ,0.46 + ,0.25 + ,0.68 + ,0.42 + ,0.50 + ,0.50 + ,0.25 + ,0.37 + ,0.11 + ,0.62 + ,0.24 + ,0.37 + ,0.55 + ,0.08 + ,0.50 + ,0.09 + ,0.45 + ,0.37 + ,0.48 + ,0.45 + ,0.36 + ,0.42 + ,0.49 + ,0.29 + ,0.39 + ,0.00 + ,0.40 + ,0.39 + ,0.21 + ,0.10 + ,0.50 + ,0.50 + ,0.32 + ,0.28 + ,0.23 + ,0.22 + ,0.15 + ,0.29 + ,0.25 + ,0.19 + ,0.60 + ,0.49) > 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 1 digit(s) to the left of the | 0 | 066889 1 | 0113355569 2 | 01111222334555567788899999 3 | 011222222223334444555566667777777777777888889999999999 4 | 00000111112222222333333334444444455555555556666667777778888888889999 5 | 00000000000111111111122222233344444455555555666777888888888999999 6 | 001112222233344444555666777888999 7 | 00000122245688 8 | 111 9 | 1 10 | 11 | 12 | 13 | 14 | 15 | 4 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/18ffv1324036681.tab") > > > > proc.time() user system elapsed 0.340 0.000 0.343