[R-pkg-devel] Depreciate Function
georgi.boshnakov at manchester.ac.uk
Wed Feb 7 20:46:57 CET 2018
If the calls to your deprecated function can be replaced by calls to the new function - just do that.
In this way users will not be tempted to use the deprecated function.
If that is difficult, you can put a print statement in your old function telling the users whatever you want.
But this may well go unnoticed and is likely focused trouble to your users. And real pain if your package is used in other packages.
From: R-package-devel [r-package-devel-bounces at r-project.org] on behalf of Rami Krispin [rami.krispin at gmail.com]
Sent: 07 February 2018 18:49
To: Maxime Turgeon
Cc: r-package-devel at r-project.org
Subject: Re: [R-pkg-devel] Depreciate Function
I follow the example of the R Packages book about depreciating a function
which can be find here:
Is there another method to rename a function name? maybe to print message
without triggering warning?
On Wed, Feb 7, 2018 at 1:36 PM, Maxime Turgeon <
maxime.turgeon at mail.mcgill.ca> wrote:
> Hi Rami,
> Is there a reason for still using the deprecated functions in your
> examples? Because that's what's triggering the warnings.
> *From:* R-package-devel <r-package-devel-bounces at r-project.org> on behalf
> of Rami Krispin <rami.krispin at gmail.com>
> *Sent:* February 7, 2018 1:32:37 PM
> *To:* Uwe Ligges
> *Cc:* r-package-devel at r-project.org
> *Subject:* Re: [R-pkg-devel] Depreciate Function
> Yes, I am keeping the old version and passing the function parameters into
> the new version.
> I forgot in my previous email to add the log:
> and here is an example of the function that triggers that warning
> On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges <ligges at statistik.tu-dortmund.
> > wrote:
> > Not sure where you get the warning. I guess only at places where you
> > use the old variant?
> > Best,
> > Uwe Ligges
> > On 07.02.2018 16:38, Rami Krispin wrote:
> >> Hello all,
> >> I am trying to depreciate functions and replace them with a different
> >> function in the new version of the package, using the Depreciate
> >> which triggers warnings during the package submission to CRAN. For
> >> example,
> >> I am replacing the function seasonal_ly with the function ts_seasonal
> >> using
> >> the following method:
> >> - export both of the functions
> >> - aliases seasonal_ly
> >> - pass the arguments of the new function to the old function and use
> >> the
> >> Depreciate function to trigger a warning about the depreciating of
> >> function and the name of the new function.
> >> The code is available over here:
> >> https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R
> >> Any suggestions?
> >> Thank you in advance!
> >> Best regards,
> >> Rami Krispin
> >> [[alternative HTML version deleted]]
> >> ______________________________________________
> >> R-package-devel at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> [[alternative HTML version deleted]]
> R-package-devel at r-project.org mailing list
[[alternative HTML version deleted]]
R-package-devel at r-project.org mailing list
More information about the R-package-devel