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(151.254 + ,209.164 + ,243.79 + ,211.901 + ,149.066 + ,385.924 + ,198.781 + ,213.939 + ,219.639 + ,132.373 + ,222.839 + ,187.809 + ,98.27 + ,233.134 + ,245.107 + ,183.913 + ,188.237 + ,332.405 + ,269.78 + ,174.055 + ,717.52 + ,943.899 + ,241.958 + ,186.148 + ,168.574 + ,292.059 + ,292.059 + ,191.253 + ,186.966 + ,185.032 + ,209.679 + ,399.61 + ,241.86 + ,306.713 + ,162.942 + ,328.32 + ,311.735 + ,259.533 + ,172.653 + ,148.338 + ,322.535 + ,160.454 + ,140.944 + ,187.874 + ,258.391 + ,146.413 + ,198.779 + ,211.375 + ,297.935 + ,191.444 + ,702.266 + ,197.64 + ,455.764 + ,269.896 + ,396.076 + ,174.194 + ,210.515 + ,178.705 + ,168.359 + ,193.276 + ,200.352 + ,183.312 + ,189.727 + ,233.626 + ,86.239 + ,202.606 + ,424.356 + ,189.556 + ,131.816 + ,269.203 + ,159.58 + ,226.36 + ,510.63 + ,169.266 + ,141.536 + ,187.418 + ,177.794 + ,160.709 + ,214.781 + ,412.188 + ,452.975 + ,175.922 + ,213.447 + ,215.826 + ,395.029 + ,174.529 + ,372.051 + ,217.424 + ,99.674 + ,203.67 + ,171.426 + ,371.465 + ,367.468 + ,235.155 + ,199.164 + ,192.436 + ,212.513 + ,251.211 + ,466.301 + ,240.619 + ,186.732 + ,152.64 + ,119.166 + ,324.418 + ,132.599 + ,214.858 + ,162.229 + ,307.655 + ,230.739 + ,183.445 + ,256.928 + ,199.774 + ,269.412 + ,128.025 + ,188.269 + ,190.706 + ,247.713 + ,164.128 + ,314.343 + ,335.093 + ,204.516 + ,213.859 + ,144.093 + ,700.647 + ,213.393 + ,181.88 + ,218.735 + ,158.481 + ,213.439 + ,137.434 + ,190.889 + ,111.579 + ,263.205 + ,152.194 + ,215.518 + ,291.328 + ,145.049 + ,295.651 + ,329.82 + ,184.932 + ,216.06 + ,176.094 + ,201.536 + ,228.474 + ,219.687 + ,179.2 + ,287.867 + ,342.334 + ,147.397 + ,186.126 + ,356.178 + ,253.792 + ,167.39 + ,292.208 + ,161.99 + ,193.451 + ,202.754 + ,106.341 + ,354.741 + ,135.419 + ,204.077 + ,206.275) > 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 2 digit(s) to the right of the | 0 | 9 1 | 00112333344444 1 | 555555556666666677777777788888888889999999999999999999 2 | 00000000000011111111111111222222223333344444 2 | 55556666777799999 3 | 0011112233344 3 | 567779 4 | 00012 4 | 567 5 | 1 5 | 6 | 6 | 7 | 002 7 | 8 | 8 | 9 | 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/1pepj1323967436.tab") > > > > proc.time() user system elapsed 0.290 0.040 0.321