> hist(phat1000$t)
2008-05-24 14:47:33.633 R[252] *** Assertion failure in -[RDeviceView lockFocus], AppKit.subproj/NSView.m:3248
2008-05-24 14:47:33.633 R[252] *** REngine.runREPL: caught ObjC exception in the main loop!
*** Please report the following error on r-sig-mac@r-project.org along with the full description of how to reproduce it:
*** reason: lockFocus sent to a view whose window is deferred and does not yet have a corresponding platform window
*** name: NSInternalInconsistencyException, info: (null)
*** Version: R 2.5.1 (42083) R.app R 2.5.1 GUI 1.20 (4535)/ppc
Consider saving your work soon in case this problem leads to a full crash.

library(boot)

Binom1321Dat <- c(rep(1,13),rep(0,8))

Binom1921Dat <- c(rep(1,19),0,0)



# Next define a function which is needed in the 'boot' command.



phat <- function(d,i) {sum(d[i])/21}



# Generate 1000 bootstrap samples for the data with hit rate 13/21  

# and plot a histogram of the estimate of p for these samples. 



boot(Binom1321Dat,phat,1000)

phat1000 <- boot(Binom1321Dat,phat,1000)

hist(phat1000$t)


      
	[[alternative HTML version deleted]]

