Skip to content

Commit

Permalink
switch to requireNamespace()
Browse files Browse the repository at this point in the history
also remove src/symbols.rds in cleanup
  • Loading branch information
eddelbuettel committed Jan 21, 2015
1 parent 9cd1240 commit dc3ca63
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,9 @@

* inst/include/*: Upgraded to release 4.600.4 of Armadillo

* R/unit.test.R (unit_test_setup): Use requireNamespace()
* R/RcppArmadillo.package.skeleton.R: Ditto

2015-01-20 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION: Release 0.4.600.3.0 [GitHub only]
Expand Down
2 changes: 1 addition & 1 deletion R/RcppArmadillo.package.skeleton.R
Expand Up @@ -32,7 +32,7 @@ RcppArmadillo.package.skeleton <- function(name="anRpackage", list=character(),
fake <- FALSE
}

haveKitten <- require("pkgKitten", quietly=TRUE, character.only=TRUE)
haveKitten <- requireNamespace("pkgKitten", quietly=TRUE, character.only=TRUE)
skelFunUsed <- ifelse(haveKitten, "kitten", "package.skeleton")
message("\nCalling ", skelFunUsed, " to create basic package.")

Expand Down
4 changes: 2 additions & 2 deletions R/unit.test.R
@@ -1,4 +1,4 @@
# Copyright (C) 2010 - 2013 Dirk Eddelbuettel, Romain Francois and Douglas Bates
# Copyright (C) 2010 - 2015 Dirk Eddelbuettel, Romain Francois and Douglas Bates
#
# This file is part of RcppArmadillo.
#
Expand Down Expand Up @@ -31,7 +31,7 @@ unit_test_setup <- function(file = NULL, packages = NULL) {
function(){
if (!is.null(packages)) {
for (p in packages) {
suppressMessages(require(p, character.only = TRUE))
suppressMessages(requireNamespace(p))
}
}
if (!is.null(file)) {
Expand Down
2 changes: 1 addition & 1 deletion cleanup
@@ -1,7 +1,7 @@
#!/bin/sh

rm -f config.log config.status confdefs.h \
src/*.o src/*.so \
src/*.o src/*.so src/symbols.rds \
vignettes/RcppArmadillo-unitTests.out \
vignettes/RcppArmadillo-unitTests.aux \
vignettes/RcppArmadillo-unitTests.log \
Expand Down

0 comments on commit dc3ca63

Please sign in to comment.