Skip to content

Commit 0ca43cf

Browse files
committed
switch to requireNamespace() to test for Suggests: only package
this pleases R-devel CMD check
1 parent 35f8a45 commit 0ca43cf

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

ChangeLog

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
* vignettes/getCurrentVersionsOfCitedPackages.R: New helper function
66
* .Rbuildignore: Added vignettes/getCurrentVersionsOfCitedPackages.R
77

8-
2015-01-05 Wush Wu <[email protected]>
8+
* R/unit.tests.R (test): Use requireNamespace() instead of require()
9+
* R/unit.tests.R (test): Ditto
10+
11+
2015-01-19 Wush Wu <[email protected]>
912

1013
* inst/include/Rcpp/sugar/functions/var.h: Support four vector types
1114
* inst/unitTests/runit.sugar.var.R: Added corresponding tests

R/Rcpp.package.skeleton.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- tab-width: 4; -*-
22

3-
# Copyright (C) 2009 - 2014 Dirk Eddelbuettel and Romain Francois
3+
# Copyright (C) 2009 - 2015 Dirk Eddelbuettel and Romain Francois
44
#
55
# This file is part of Rcpp.
66
#
@@ -28,7 +28,7 @@ Rcpp.package.skeleton <- function(name = "anRpackage", list = character(),
2828
email = "[email protected]",
2929
license = "GPL (>= 2)") {
3030

31-
havePkgKitten <- require("pkgKitten", quietly=TRUE, character.only=TRUE)
31+
havePkgKitten <- requireNamespace("pkgKitten", quietly=TRUE, character.only=TRUE)
3232

3333
call <- match.call()
3434
call[[1]] <- as.name("package.skeleton")

R/unit.tests.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2010 - 2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
1+
# Copyright (C) 2010 - 2015 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
22
#
33
# This file is part of Rcpp.
44
#
@@ -19,7 +19,7 @@ test <- function(output=if(file.exists("/tmp")) "/tmp" else getwd(),
1919
gctorture=FALSE,
2020
gctorture.exclude="runit.Module.client.package.R") {
2121

22-
if (require(RUnit)) {
22+
if (requireNamespace("RUnit")) {
2323

2424
if (gctorture) {
2525

0 commit comments

Comments
 (0)