[Distr-commits] r341 - pkg/SweaveListingUtils/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Nov 19 19:42:31 CET 2008
Author: stamats
Date: 2008-11-19 19:42:31 +0100 (Wed, 19 Nov 2008)
New Revision: 341
Modified:
pkg/SweaveListingUtils/R/keywordsStyle.R
Log:
some changes such that the results of base::library are obtained
Modified: pkg/SweaveListingUtils/R/keywordsStyle.R
===================================================================
--- pkg/SweaveListingUtils/R/keywordsStyle.R 2008-11-19 07:15:35 UTC (rev 340)
+++ pkg/SweaveListingUtils/R/keywordsStyle.R 2008-11-19 18:42:31 UTC (rev 341)
@@ -141,7 +141,9 @@
pkg <- as.character(substitute(package))
mc <- as.list(match.call(expand.dots = FALSE))[-1]
rerg <- .LibOrRequire(pkg, mc, base::library)
- return(rerg)
+ if(class(rerg) == "libraryIQR") return(rerg)
+ if(logical.return) return(rerg)
+ return(invisible(rerg))
}
.LibOrRequire <- function(pkg, mc, fct){
@@ -190,5 +192,5 @@
}else{
rerg <- do.call(fct, args=mc)
}
- return(invisible(rerg))
+ return(rerg)
}
More information about the Distr-commits
mailing list