From: <li...@us...> - 2008-01-21 15:50:13
|
Revision: 83 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=83&view=rev Author: ligges Date: 2008-01-21 07:50:10 -0800 (Mon, 21 Jan 2008) Log Message: ----------- moved is.R() check into openbugs.R() Modified Paths: -------------- trunk/R2WinBUGS/R/openbugs.R Modified: trunk/R2WinBUGS/R/openbugs.R =================================================================== --- trunk/R2WinBUGS/R/openbugs.R 2008-01-18 17:00:00 UTC (rev 82) +++ trunk/R2WinBUGS/R/openbugs.R 2008-01-21 15:50:10 UTC (rev 83) @@ -1,14 +1,14 @@ - -if (is.R()) { - openbugs <- function(data, inits, parameters.to.save, model.file="model.txt", n.chains = 3, n.iter = 2000, n.burnin = floor(n.iter/2), n.thin = max(1, floor(n.chains *(n.iter - n.burnin) / n.sims)), n.sims = 1000, DIC = TRUE, bugs.directory = "c:/Program Files/OpenBUGS/", working.directory=NULL, digits = 5) { + if(!is.R()) + stop("OpenBUGS is not yet available in S-PLUS") if(!require("BRugs")) stop("BRugs is required") + ## switching from bugs() to BRugsFit() notation modelFile <- model.file numChains <- n.chains @@ -93,5 +93,3 @@ a.stem <- substr(a, 1, ifelse(bracket.pos>0, bracket.pos-1, nchar(a))) a[order(match(a.stem, b))] } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |