Re: [R-pkg-devel] function name conflict problem

2020-02-05 Thread sierrastew
Thanks to all who responded.

Correct that package ‘karon’ is the problem.  The current package has a more 
meaningful name.  ‘karon’ was the earlier name; functions have been renamed.

I deleted all the old function files, though they had been Committed to GitHub. 
 A colleague working with me wrote:

 

I found that one of the objects in /data were loading the old 'karon' library 
when that data object was loaded. The old 'karon' library was then loading all 
of the mgcv and ellipse packages, rather than just the specific functions we 
are using.

 

I have no idea why one of the data objects (used in the examples) would load 
the library.

 

From: Hugh Parsonage  
Sent: Wednesday, February 5, 2020 12:31 AM
To: sierras...@mindspring.com
Cc: r-package-devel@r-project. org 
Subject: Re: [R-pkg-devel] function name conflict problem

 

Package karon is the problem. Is that package in your depends or imports? Does 
that package use Depends?

 

On Wed, 5 Feb 2020 at 8:24 am, mailto:sierras...@mindspring.com> > wrote:

In trying to develop a package to be submitted to CRAN, when I do Install
and Reload or devtools::check(), I get the warning:



Warning: replacing previous import 'ellipse::pairs' by 'graphics::pairs'
when loading 'karon'

Warning: replacing previous import 'MVN::mvn' by 'mgcv::mvn' when loading
'karon'



I need one function each from the packages ellipse and mgcv (I do not need
pairs from ellipse and mvn from mgcv).  To restrict to the function that I
need, I have used the commands

@importFrom  ellipse  ellipse

@importFrom  mgcv  in.out



NAMESPACE includes the lines

importFrom(ellipse,ellipse)

importFrom(mgcv,in.out)



However, DESCRIPTION does not restrict the functions imported from ellipse
and mgcv; it has

Imports: MVN, MASS, scatterplot3d, rgl, mgcv, randomForest, rpart, partykit,
Formula, ellipse,..



Do these warnings need to be solved before submitting to CRAN?

Is it necessary to edit DESCRIPTION  If so, what should be done?

Is there some other potential solution?



Thanks!


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] function name conflict problem

2020-02-04 Thread sierrastew
Thanks.  I had seen this but it didn't register.  I made this change to all
the potential conflicts (the packages ellipse and mgcv are never in an
@import statement), but I still get the conflict messages.  John Karon

 

From: Max Turgeon  
Sent: Tuesday, February 4, 2020 3:10 PM
To: sierras...@mindspring.com; r-package-devel@r-project. org

Subject: Re: [R-pkg-devel] function name conflict problem

 

I find it's well explained in the book by Hadley Wickham:

http://r-pkgs.had.co.nz/namespace.html#imports

 

If package ellipse is in Imports (in your DESCRIPTION file), then
install.packages will make sure it's available on the user's system when
installing your own package. Therefore you can write ellipse::ellipse
without requiring importFrom(ellipse,ellipse) in your NAMESPACE.

 

Max Turgeon
Assistant Professor

Department of Statistics
Department of Computer Science
University of Manitoba

  maxturgeon.ca

 

  _  

From: R-package-devel mailto:r-package-devel-boun...@r-project.org> > on behalf of
sierras...@mindspring.com mailto:sierras...@mindspring.com> >
Sent: February 4, 2020 3:48:16 PM
To: r-package-devel@r-project. org
Subject: [R-pkg-devel] function name conflict problem 

 

Thanks Duncan.  Please clarify: if I use ellipse::ellipse in code, do I need
to have @importFrom ellipse eliipse in the Roxygen code.

-Original Message-
From: Duncan Murdoch < 
murdoch.dun...@gmail.com> 
Sent: Tuesday, February 4, 2020 2:45 PM
To:   sierras...@mindspring.com
Subject: Re: [R-pkg-devel] function name conflict problem

If you call it via ellipse::ellipse, you don't need to mention it in
NAMESPACE.

I can't tell what's going wrong in your NAMESPACE file, but that's where the
problem is that leads to the errors you saw.

In future, please don't write privately, post to the list.

Duncan Murdoch

On 04/02/2020 4:40 p.m.,  
sierras...@mindspring.com wrote:
> Thanks very much for the quick reply.  Here is the entire set of import
commands from NAMESPACE.  Also, when I use the function ellipse, I code it
as ellipse::ellipse; similarly for using in.out.  I don't see any request
for anything but ellipse from the package ellipse, and in.out from mgcv:
> 
> import(Formula)
> import(MASS)
> import(assertthat)
> import(corrplot)
> import(grDevices)
> import(graphics)
> import(missForest)
> import(nortest)
> import(partykit)
> import(qqtest)
> import(randomForest)
> import(rpart)
> import(scatterplot3d)
> import(stats)
> importFrom(MVN,mvn)
> importFrom(ellipse,ellipse)
> importFrom(graphics,pairs)
> importFrom(mgcv,in.out)
> importFrom(rgl,rgl.postscript)
> 
> -Original Message-
> From: Duncan Murdoch < 
murdoch.dun...@gmail.com>
> Sent: Tuesday, February 4, 2020 2:31 PM
> To:   sierras...@mindspring.com;
r-package-devel@r-project. org 
> <  r-package-devel@r-project.org>
> Subject: Re: [R-pkg-devel] function name conflict problem
> 
> On 04/02/2020 4:21 p.m.,  
sierras...@mindspring.com wrote:
>> In trying to develop a package to be submitted to CRAN, when I do 
>> Install and Reload or devtools::check(), I get the warning:
>>
>>
>>
>> Warning: replacing previous import 'ellipse::pairs' by 'graphics::pairs'
>> when loading 'karon'
>>
>> Warning: replacing previous import 'MVN::mvn' by 'mgcv::mvn' when 
>> loading 'karon'
>>
>>
>>
>> I need one function each from the packages ellipse and mgcv (I do not 
>> need pairs from ellipse and mvn from mgcv).  To restrict to the 
>> function that I need, I have used the commands
>>
>> @importFrom  ellipse  ellipse
>>
>> @importFrom  mgcv  in.out
>>
>>
>>
>> NAMESPACE includes the lines
>>
>> importFrom(ellipse,ellipse)
>>
>> importFrom(mgcv,in.out)
>>
>>
>>
>> However, DESCRIPTION does not restrict the functions imported from 
>> ellipse and mgcv; it has
>>
>> Imports: MVN, MASS, scatterplot3d, rgl, mgcv, randomForest, rpart, 
>> partykit, Formula, ellipse,..
>>
>>
>>
>> Do these warnings need to be solved before submitting to CRAN?
>>
>> Is it necessary to edit DESCRIPTION  If so, what should be done?
>>
>> Is there some other potential solution?
> 
> I don't know if they *must* be fixed, but they should be.  Something in
your NAMESPACE file (derived from some comment in your code by roxygen2) is
importing ellipse::pairs, even though you say you don't want to do that.
You should fix that.
> 
>   From what we can see, your DESCRIPTION file is fine.  The problem lies
in NAMESPACE.
> 
> Duncan Murdoch
> 

__
  R-package-devel@r-project.org
mailing list
 

[R-pkg-devel] function name conflict problem

2020-02-04 Thread sierrastew
In trying to develop a package to be submitted to CRAN, when I do Install
and Reload or devtools::check(), I get the warning:

 

Warning: replacing previous import 'ellipse::pairs' by 'graphics::pairs'
when loading 'karon'

Warning: replacing previous import 'MVN::mvn' by 'mgcv::mvn' when loading
'karon'

 

I need one function each from the packages ellipse and mgcv (I do not need
pairs from ellipse and mvn from mgcv).  To restrict to the function that I
need, I have used the commands

@importFrom  ellipse  ellipse

@importFrom  mgcv  in.out

 

NAMESPACE includes the lines

importFrom(ellipse,ellipse)

importFrom(mgcv,in.out)

 

However, DESCRIPTION does not restrict the functions imported from ellipse
and mgcv; it has

Imports: MVN, MASS, scatterplot3d, rgl, mgcv, randomForest, rpart, partykit,
Formula, ellipse,..

 

Do these warnings need to be solved before submitting to CRAN?

Is it necessary to edit DESCRIPTION  If so, what should be done?

Is there some other potential solution?

 

Thanks!


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel