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(213008 + ,120982 + ,176537 + ,184969 + ,128552 + ,52746 + ,385534 + ,33170 + ,149061 + ,165446 + ,255558 + ,180915 + ,138816 + ,279314 + ,185362 + ,330754 + ,242201 + ,248074 + ,137731 + ,217015 + ,238060 + ,352819 + ,153935 + ,132943 + ,176297 + ,174415 + ,227308 + ,223632 + ,128603 + ,238315 + ,220067 + ,171645 + ,269655 + ,84853 + ,319589 + ,215641 + ,331650 + ,167548 + ,114673 + ,275650 + ,275861 + ,155363 + ,155774 + ,128649 + ,129301 + ,368166 + ,78800 + ,183167 + ,289575 + ,154368 + ,168809 + ,24188 + ,329267 + ,65029 + ,101097 + ,223355 + ,256087 + ,248342 + ,269536 + ,214872 + ,324427 + ,254411 + ,184360 + ,214011 + ,196553 + ,178886 + ,143250 + ,189237 + ,187681 + ,120478 + ,182192 + ,73566 + ,194979 + ,167488 + ,147958 + ,289924 + ,251351 + ,185082 + ,138570 + ,152450 + ,123905 + ,364565 + ,145790 + ,201714 + ,80953 + ,122774 + ,130585 + ,298851 + ,255899 + ,148553 + ,211322 + ,187632 + ,149018 + ,220959 + ,247964 + ,162765 + ,200476 + ,232138 + ,290838 + ,315389 + ,233269 + ,232317 + ,151811 + ,43287 + ,157799 + ,168180 + ,220195 + ,252225 + ,99466 + ,100750 + ,230772 + ,262070 + ,22938 + ,152474 + ,61857 + ,132487 + ,317394 + ,21054 + ,209641 + ,31414 + ,249237 + ,184528 + ,140189 + ,112178 + ,38214 + ,158671 + ,287703 + ,172558 + ,340803 + ,253210 + ,352257 + ,158015 + ,85439 + ,236202 + ,366492 + ,84925 + ,331866 + ,131069 + ,211775 + ,170863 + ,157949 + ,314332 + ,202656 + ,173260 + ,268676 + ,112739 + ,200511 + ,228606 + ,1 + ,14688 + ,98 + ,455 + ,0 + ,0 + ,184207 + ,293412 + ,0 + ,203 + ,7199 + ,46660 + ,17547 + ,95227 + ,969 + ,156828) > 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 | 00000001758 2 | 134138 4 | 373 6 | 2549 8 | 155559 10 | 11235 12 | 013499991123899 14 | 0368999222445678889 16 | 35788912334679 18 | 12344555588957 20 | 012301234567 22 | 00134791223688 24 | 288891234666 26 | 2900669 28 | 800139 30 | 457 32 | 049122 34 | 123 36 | 568 38 | 6 > > #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/1pq6e1323126654.tab") > > > > proc.time() user system elapsed 0.221 0.036 0.267