R/decide.r

Defines functions decide

decide<-function(log.MH) {
  if(is.na(log.MH)){
    print(log.MH)
    log.MH=-Inf
  }
  if(runif(1,min=0,max=1) < exp(log.MH))	return(TRUE)
  else return(FALSE)
}

Try the MetaLandSim package in your browser

Any scripts or data that you put into this service are public.

MetaLandSim documentation built on Jan. 13, 2023, 1:11 a.m.