Skip to content
Prev 276861 / 398506 Next

ggplot stat_summary (mean_cl_boot)

On Nov 9, 2011, at 4:35 PM, Nathan Miller wrote:

            
Actually it does.
It doesn't. That is not the right name.
Hadley's help files in ggplot2 are terse (or the links to outside  
resources crash my R sessions)  to the point of being too frustrating  
for me to consider using that package, so I don't know if optional  
parameters can be passed to the Hmisc functions. If they are,  then  
you should set reps=TRUE and then see what happens to the number of  
reps from the returned object ... if the wrap_hmisc function does  
happen to catch it.

 > x <- rnorm(100)
 > smean.cl.boot(x)
       Mean      Lower      Upper
-0.0211511 -0.2013623  0.1469728

 > smean.cl.boot(x, reps=TRUE)
        Mean       Lower       Upper
-0.03465361 -0.21233213  0.15178655
attr(,"reps")
    [1]  0.0283330508 -0.1250784237  0.0744640779  0.1310826601  
-0.1373094536
    [6]  0.0629291714  0.0145916070 -0.0860141221  0.0549134451   
0.0732892908
snipped pages of intervening output.
  [991]  0.1029922424  0.0613358597 -0.0645577851 -0.1664905503  
-0.1249615180
  [996] -0.0751783377 -0.0043747455 -0.1155948060 -0.0750075659   
0.1244430930

I don't see where the number of reps is returned, but the B setting  
defaults to 1000.