R version 2.15.2 (2012-10-26) -- "Trick or Treat" 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. > x <- c(210907 + ,120982 + ,176508 + ,179321 + ,123185 + ,52746 + ,385534 + ,33170 + ,101645 + ,149061 + ,165446 + ,237213 + ,173326 + ,133131 + ,258873 + ,180083 + ,324799 + ,230964 + ,236785 + ,135473 + ,202925 + ,215147 + ,344297 + ,153935 + ,132943 + ,174724 + ,174415 + ,225548 + ,223632 + ,124817 + ,221698 + ,210767 + ,170266 + ,260561 + ,84853 + ,294424 + ,101011 + ,215641 + ,325107 + ,7176 + ,167542 + ,106408 + ,96560 + ,265769 + ,269651 + ,149112 + ,175824 + ,152871 + ,111665 + ,116408 + ,362301 + ,78800 + ,183167 + ,277965 + ,150629 + ,168809 + ,24188 + ,329267 + ,65029 + ,101097 + ,218946 + ,244052 + ,341570 + ,103597 + ,233328 + ,256462 + ,206161 + ,311473 + ,235800 + ,177939 + ,207176 + ,196553 + ,174184 + ,143246 + ,187559 + ,187681 + ,119016 + ,182192 + ,73566 + ,194979 + ,167488 + ,143756 + ,275541 + ,243199 + ,182999 + ,135649 + ,152299 + ,120221 + ,346485 + ,145790 + ,193339 + ,80953 + ,122774 + ,130585 + ,112611 + ,286468 + ,241066 + ,148446 + ,204713 + ,182079 + ,140344 + ,220516 + ,243060 + ,162765 + ,182613 + ,232138 + ,265318 + ,85574 + ,310839 + ,225060 + ,232317 + ,144966 + ,43287 + ,155754 + ,164709 + ,201940 + ,235454 + ,220801 + ,99466 + ,92661 + ,133328 + ,61361 + ,125930 + ,100750 + ,224549 + ,82316 + ,102010 + ,101523 + ,243511 + ,22938 + ,41566 + ,152474 + ,61857 + ,99923 + ,132487 + ,317394 + ,21054 + ,209641 + ,22648 + ,31414 + ,46698 + ,131698 + ,91735 + ,244749 + ,184510 + ,79863 + ,128423 + ,97839 + ,38214 + ,151101 + ,272458 + ,172494 + ,108043 + ,328107 + ,250579 + ,351067 + ,158015 + ,98866 + ,85439 + ,229242 + ,351619 + ,84207 + ,120445 + ,324598 + ,131069 + ,204271 + ,165543 + ,141722 + ,116048 + ,250047 + ,299775 + ,195838 + ,173260 + ,254488 + ,104389 + ,136084 + ,199476 + ,92499 + ,224330 + ,135781 + ,74408 + ,81240 + ,14688 + ,181633 + ,271856 + ,7199 + ,46660 + ,17547 + ,133368 + ,95227 + ,152601 + ,98146 + ,79619 + ,59194 + ,139942 + ,118612 + ,72880 + ,65475 + ,99643 + ,71965 + ,77272 + ,49289 + ,135131 + ,108446 + ,89746 + ,44296 + ,77648 + ,181528 + ,134019 + ,124064 + ,92630 + ,121848 + ,52915 + ,81872 + ,58981 + ,53515 + ,60812 + ,56375 + ,65490 + ,80949 + ,76302 + ,104011 + ,98104 + ,67989 + ,30989 + ,135458 + ,73504 + ,63123 + ,61254 + ,74914 + ,31774 + ,81437 + ,87186 + ,50090 + ,65745 + ,56653 + ,158399 + ,46455 + ,73624 + ,38395 + ,91899 + ,139526 + ,52164 + ,51567 + ,70551 + ,84856 + ,102538 + ,86678 + ,85709 + ,34662 + ,150580 + ,99611 + ,19349 + ,99373 + ,86230 + ,30837 + ,31706 + ,89806 + ,62088 + ,40151 + ,27634 + ,76990 + ,37460 + ,54157 + ,49862 + ,84337 + ,64175 + ,59382 + ,119308 + ,76702 + ,103425 + ,70344 + ,43410 + ,104838 + ,62215 + ,69304 + ,53117 + ,19764 + ,86680 + ,84105 + ,77945 + ,89113 + ,91005 + ,40248 + ,64187 + ,50857 + ,56613 + ,62792 + ,72535) > par2 = '0' > par1 = '8' > ylab = 'density' > xlab = 'value of data series' > main = 'Histogram and Fitted Normal Density' > par2 <- '0' > par1 <- '8' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), 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: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(MASS) > par1 <- as.numeric(par1) > if (par2 == '0') par2 = 'Sturges' else par2 <- as.numeric(par2) > x <- as.ts(x) #otherwise the fitdistr function does not work properly > r <- fitdistr(x,'normal') > r mean sd 138088.052 82196.827 ( 4835.107) ( 3418.937) > postscript(file="/var/fisher/rcomp/tmp/1yhlf1354113909.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > myhist<-hist(x,col=par1,breaks=par2,main=main,ylab=ylab,xlab=xlab,freq=F) > curve(1/(r$estimate[2]*sqrt(2*pi))*exp(-1/2*((x-r$estimate[1])/r$estimate[2])^2),min(x),max(x),add=T) > dev.off() null device 1 > > #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,'Parameter',1,TRUE) > a<-table.element(a,'Estimated Value',1,TRUE) > a<-table.element(a,'Standard Deviation',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'mean',header=TRUE) > a<-table.element(a,r$estimate[1]) > a<-table.element(a,r$sd[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'standard deviation',header=TRUE) > a<-table.element(a,r$estimate[2]) > a<-table.element(a,r$sd[2]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/2e4ye1354113909.tab") > > try(system("convert tmp/1yhlf1354113909.ps tmp/1yhlf1354113909.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.032 0.240 1.250