Servet Ahmet Çizmeli
2020-Feb-16 11:03 UTC
[R] testing my package : unstated dependency to self in package tests
I am updating my CRAN package geoSpectral. I get the following Warning during R CMD check : ... * checking for unstated dependencies in ?tests? ... WARNING 'library' or 'require' call not declared from: ?geoSpectral? .... All the .R files I have under the testhat directory begin by : library(geoSpectral) library(testthat) and there I call package functions directly (without the prefix geoSpectal:: ) See https://github.com/cran/geoSpectral/blob/master/tests/testthat/Spectra_tests.R Searching the web, I found examples where the same Warning has been issued for some other packages. But in my case the package in question is my own package I am testing.... Confused and at loss. Anyone with ideas? regards Servet [[alternative HTML version deleted]]
Michael Dewey
2020-Feb-16 16:54 UTC
[R] testing my package : unstated dependency to self in package tests
When something similar happened to me I found it went away when I added Suggests: <packagename> to the DESCRIPTION file. Whether this will work for you I have no idea. Michael On 16/02/2020 11:03, Servet Ahmet ?izmeli wrote:> I am updating my CRAN package geoSpectral. I get the following Warning during R CMD check : > > ... > * checking for unstated dependencies in ?tests? ... WARNING > 'library' or 'require' call not declared from: ?geoSpectral? > .... > > > All the .R files I have under the testhat directory begin by : > library(geoSpectral) > library(testthat) > > and there I call package functions directly (without the prefix geoSpectal:: ) > See https://github.com/cran/geoSpectral/blob/master/tests/testthat/Spectra_tests.R > > Searching the web, I found examples where the same Warning has been issued for some other packages. But in my case the package in question is my own package I am testing.... > > Confused and at loss. Anyone with ideas? > regards > Servet > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Michael http://www.dewey.myzen.co.uk/home.html
Jeff Newmiller
2020-Feb-16 17:22 UTC
[R] testing my package : unstated dependency to self in package tests
I think the Posting Guide would call this the wrong mailing list for this question: should be on R-package-devel. On February 16, 2020 3:03:55 AM PST, "Servet Ahmet ?izmeli" <Servet.Ahmet.Cizmeli at USherbrooke.ca> wrote:>I am updating my CRAN package geoSpectral. I get the following Warning >during R CMD check : > >... >* checking for unstated dependencies in ?tests? ... WARNING >'library' or 'require' call not declared from: ?geoSpectral? >.... > > >All the .R files I have under the testhat directory begin by : >library(geoSpectral) >library(testthat) > >and there I call package functions directly (without the prefix >geoSpectal:: ) >See >https://github.com/cran/geoSpectral/blob/master/tests/testthat/Spectra_tests.R > >Searching the web, I found examples where the same Warning has been >issued for some other packages. But in my case the package in question >is my own package I am testing.... > >Confused and at loss. Anyone with ideas? >regards >Servet > > [[alternative HTML version deleted]]-- Sent from my phone. Please excuse my brevity.
Servet Ahmet Çizmeli
2020-Feb-16 23:02 UTC
[R] testing my package : unstated dependency to self in package tests
That worked. Thanks. ________________________________ From: Michael Dewey <lists at dewey.myzen.co.uk> Sent: Sunday, February 16, 2020 5:54 PM To: Servet Ahmet ?izmeli <Servet.Ahmet.Cizmeli at USherbrooke.ca>; r-help at r-project.org <r-help at r-project.org> Subject: Re: [R] testing my package : unstated dependency to self in package tests When something similar happened to me I found it went away when I added Suggests: <packagename> to the DESCRIPTION file. Whether this will work for you I have no idea. Michael On 16/02/2020 11:03, Servet Ahmet ?izmeli wrote:> I am updating my CRAN package geoSpectral. I get the following Warning during R CMD check : > > ... > * checking for unstated dependencies in ?tests? ... WARNING > 'library' or 'require' call not declared from: ?geoSpectral? > .... > > > All the .R files I have under the testhat directory begin by : > library(geoSpectral) > library(testthat) > > and there I call package functions directly (without the prefix geoSpectal:: ) > See https://github.com/cran/geoSpectral/blob/master/tests/testthat/Spectra_tests.R > > Searching the web, I found examples where the same Warning has been issued for some other packages. But in my case the package in question is my own package I am testing.... > > Confused and at loss. Anyone with ideas? > regards > Servet > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Michael http://www.dewey.myzen.co.uk/home.html [[alternative HTML version deleted]]