From: <woo...@us...> - 2007-05-15 14:59:43
|
Revision: 18 http://svn.sourceforge.net/bugs-r/?rev=18&view=rev Author: woodard_ Date: 2007-05-15 07:57:29 -0700 (Tue, 15 May 2007) Log Message: ----------- There are no namespaces in S-PLUS. Changed the read.bugs function to avoid the syntax <pkg_name>::<fn_name> in S-PLUS. Modified Paths: -------------- trunk/R2WinBUGS/R/read.bugs.R Modified: trunk/R2WinBUGS/R/read.bugs.R =================================================================== --- trunk/R2WinBUGS/R/read.bugs.R 2007-05-13 16:49:34 UTC (rev 17) +++ trunk/R2WinBUGS/R/read.bugs.R 2007-05-15 14:57:29 UTC (rev 18) @@ -1,7 +1,13 @@ read.bugs <- function(codafiles, ...){ if(!require(coda)) stop("package 'coda' is required to use this function") - coda::mcmc.list(lapply(codafiles, coda::read.coda, - index.file = file.path(dirname(codafiles[1]), "codaIndex.txt"), - ...)) + if (is.R()){ + coda::mcmc.list(lapply(codafiles, coda::read.coda, + index.file = file.path(dirname(codafiles[1]), "codaIndex.txt"), + ...)) + }else{ + mcmc.list(lapply(codafiles, read.coda, + index.file = file.path(dirname(codafiles[1]), "codaIndex.txt"), + ...)) + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |