[R-pkg-devel] dependencies

Bryan Hanson hanson at depauw.edu
Wed Nov 22 02:57:13 CET 2017


Cathy…

Regarding changes from last year, I wouldn’t worry too much about that.  The CRAN checking system is always moving toward greater stringency as the ecosystem evolves.  Requirements and messages change steadily.

I have “chased my tail” along the lines of your original description before as well.  There are ways to import the entire namespace of a package which allows one to get a working package but there the current standard is to import only the particular functions you need, not the entire namespace.  And there are differences between writing

assertr::col_concat()

and 

col_concat()

in your functions too, depending upon what you import (I may be remembering a detail incorrectly here).

Bryan

> On Nov 21, 2017, at 8:42 PM, Cathy Lee Gierke <leegi001 at umn.edu> wrote:
> 
> I have read that over and over......it doesn't seem to say when a package or function, that is already in the Namespace file will also need to be in the Description file.  It says usually if an import is in Description it also needs to be in Namespace.....but the reverse is never mentioned....
> 
> A bit more info:  A year or more ago I had all of my imports in Description.  But then it started complaining and told me to move them all t Namespace.  So there are now no imports in Description.  They are all in Namespace.  But col_concat from the package {assertr} seems to be an exception?
> 
> Cathy Lee Gierke
>       
> “Darkness cannot drive out darkness: only light can do that. Hate cannot drive out hate: only love can do that.” 
> “The arc of the moral universe is long, but it bends towards justice.”
> “Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity.” 
> “Never forget that everything Hitler did in Germany was legal.”   
> “Forgiveness is not an occasional act, it is a constant attitude.” 
> “Injustice anywhere is a threat to justice everywhere.”  
> 
> ― Martin Luther King Jr.
> 
>  <http://www.goodreads.com/author/show/23924.Martin_Luther_King_Jr_>
> On Tue, Nov 21, 2017 at 7:25 PM, Bryan Hanson <hanson at depauw.edu <mailto:hanson at depauw.edu>> wrote:
> Check out 
> 
> https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-Dependencies <https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-Dependencies> 
> 
> and see about the nuances of  Depends, Suggests and Imports
> 
> It is not sufficient for them to be listed in the NAMESPACE file only
> 
> Bryan
> 
> 
> 
>> On Nov 21, 2017, at 8:20 PM, Cathy Lee Gierke <leegi001 at umn.edu <mailto:leegi001 at umn.edu>> wrote:
>> 
>> Thanks Bryan.  All of my imports are in the namespace.  Can you tell me why this one should be in the description file?
>> 
>> Cathy Lee Gierke
>>       
>> “Darkness cannot drive out darkness: only light can do that. Hate cannot drive out hate: only love can do that.” 
>> “The arc of the moral universe is long, but it bends towards justice.”
>> “Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity.” 
>> “Never forget that everything Hitler did in Germany was legal.”   
>> “Forgiveness is not an occasional act, it is a constant attitude.” 
>> “Injustice anywhere is a threat to justice everywhere.”  
>> 
>> ― Martin Luther King Jr.
>> 
>>  <http://www.goodreads.com/author/show/23924.Martin_Luther_King_Jr_>
>> On Tue, Nov 21, 2017 at 7:19 PM, Bryan Hanson <hanson at depauw.edu <mailto:hanson at depauw.edu>> wrote:
>> Edit your DESCRIPTION file to include
>> 
>> imports: assertr
>> 
>> That’s why you get the "not required" message.
>> 
>> Bryan
>> 
>> > On Nov 21, 2017, at 7:54 PM, Cathy Lee Gierke <leegi001 at umn.edu <mailto:leegi001 at umn.edu>> wrote:
>> >
>> > Hi, I'm stuck.  I am using a function called col_concat from the package
>> > {assertr}.  But when I list it as a dependency, either by
>> >
>> > import(assertr)
>> >
>> > or
>> >
>> > importFrom("assertr", "col_concat")
>> >
>> > -----------
>> >
>> > I get this error message:
>> >
>> > * checking package dependencies ... ERROR
>> >
>> > Namespace dependency not required: ‘assertr’
>> >
>> > See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
>> >
>> > manual.
>> >
>> > * DONE
>> >
>> > Status: 1 ERROR
>> > ​------------
>> > And when I take it out, I get a complaint that col_concat has no global
>> > definition.
>> >
>> > What???
>> >
>> > Thanks,
>> > ​
>> > Cathy Lee Gierke
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-package-devel at r-project.org <mailto:R-package-devel at r-project.org> mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-package-devel <https://stat.ethz.ch/mailman/listinfo/r-package-devel>
>> 
>> 
> 
> 


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list