On Mon, Dec 8, 2014 at 3:32 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: [...]> Why not declare colorspace as a "Suggests:" kind of dependency?I guess that is a solution. :/ In another example in the 'disposables' package I have: \donttest{ pkg <- make_packages( foo1 = { f <- function() print("hello!") ; d <- 1:10 }, foo2 = { f <- function() print("hello again!") ; d <- 11:20 } ) foo1::f() foo2::f() foo1::d foo2::d dispose_packages(pkg) } So in this case should I suggest 'foo1' and 'foo2'? Gabor [...]
On 08/12/2014 3:38 PM, G?bor Cs?rdi wrote:> On Mon, Dec 8, 2014 at 3:32 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > [...] > > Why not declare colorspace as a "Suggests:" kind of dependency? > > I guess that is a solution. :/ > > In another example in the 'disposables' package I have: > > \donttest{ > pkg <- make_packages( > foo1 = { f <- function() print("hello!") ; d <- 1:10 }, > foo2 = { f <- function() print("hello again!") ; d <- 11:20 } > ) > foo1::f() > foo2::f() > foo1::d > foo2::d > dispose_packages(pkg) > } > > So in this case should I suggest 'foo1' and 'foo2'?I would guess that will lead to testing problems, since foo1 and foo2 won't be installed when R CMD check runs. In this case, I don't see a way to include that code but avoid warnings. So you could ask for forgiveness when you submit it to CRAN (and perhaps they would be forgiving), or you could use some other code in your example. Duncan Murdoch
On Mon, Dec 8, 2014 at 3:43 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: [...]> In this case, I don't see a way to include that code but avoid warnings. So > you could ask for forgiveness when you submit it to CRAN (and perhaps they > would be forgiving), or you could use some other code in your example.Just to clarify, the code does not give any errors, or even warnings, it runs without errors, even if these packages are not installed. So personally I think that this is a bug in R CMD check: it detects errors in code that does not actually produce errors. Gabor