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 function 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 the 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
[R-pkg-devel] Depreciate Function
10 messages · Rami Krispin, Uwe Ligges, Maxime Turgeon +3 more
Not sure where you get the warning. I guess only at places where you still 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 function
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 the
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
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: https://win-builder.r-project.org/incoming_pretest/180207_135041_TSstudio_011/00check.log and here is an example of the function that triggers that warning https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R Thanks! On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges <ligges at statistik.tu-dortmund.de
wrote:
Not sure where you get the warning. I guess only at places where you still 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 function
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 the
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
Hi Rami, Is there a reason for still using the deprecated functions in your examples? Because that's what's triggering the warnings. Best, Max
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
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: https://win-builder.r-project.org/incoming_pretest/180207_135041_TSstudio_011/00check.log and here is an example of the function that triggers that warning https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R Thanks! On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges <ligges at statistik.tu-dortmund.de > wrote: > Not sure where you get the warning. I guess only at places where you still > 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 function >> 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 the >> 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 https://stat.ethz.ch/mailman/listinfo/r-package-devel
I follow the example of the R Packages book about depreciating a function which can be find here: http://r-pkgs.had.co.nz/release.html Is there another method to rename a function name? maybe to print message without triggering warning? Thanks! 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. Best, Max ------------------------------ *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: https://win-builder.r-project.org/incoming_pretest/180207_ 135041_TSstudio_011/00check.log and here is an example of the function that triggers that warning https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R Thanks! On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges <ligges at statistik.tu-dortmund. de
wrote:
Not sure where you get the warning. I guess only at places where you
still
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
function
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
the
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 https://stat.ethz.ch/mailman/listinfo/r-package-devel
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. Georgi Boshnakov
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
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: http://r-pkgs.had.co.nz/release.html Is there another method to rename a function name? maybe to print message without triggering warning? Thanks! 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. > > > Best, > > Max > ------------------------------ > *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: > https://win-builder.r-project.org/incoming_pretest/180207_ > 135041_TSstudio_011/00check.log > > and here is an example of the function that triggers that warning > https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R > > Thanks! > > On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges <ligges at statistik.tu-dortmund. > de > > wrote: > > > Not sure where you get the warning. I guess only at places where you > still > > 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 > function > >> 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 > the > >> 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 > https://stat.ethz.ch/mailman/listinfo/r-package-devel > [[alternative HTML version deleted]] ______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Hi Rami, I think you're confusing two things: 1) the warning a user receives when they use a deprecated function, and 2) the warning you receive when you (or CRAN) run R CMD check. 1) This is the correct behaviour: you want to warn your users that if they don't change their code, it may break in later releases. 2) When you run R CMD check, it runs all the examples in your help pages (unless you explicitly use \dontrun). If any example triggers a warning, you get a warning; if any example triggers an error, you get an error. Now, because some of your examples run deprecated functions, it triggers a warning. Unless you *really* want to keep those examples as they are, you should change your code to use the new function. Or put another way, you probably want your users to use the new function, so the documentation should reflect that. Max
From: Rami Krispin <rami.krispin at gmail.com>
Sent: February 7, 2018 1:49:34 PM
To: Maxime Turgeon
Cc: Uwe Ligges; r-package-devel at r-project.org
Subject: Re: [R-pkg-devel] Depreciate Function
Sent: February 7, 2018 1:49:34 PM
To: Maxime Turgeon
Cc: Uwe Ligges; 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: http://r-pkgs.had.co.nz/release.html Is there another method to rename a function name? maybe to print message without triggering warning? Thanks! On Wed, Feb 7, 2018 at 1:36 PM, Maxime Turgeon <maxime.turgeon at mail.mcgill.ca<mailto: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. Best, Max ________________________________ From: R-package-devel <r-package-devel-bounces at r-project.org<mailto:r-package-devel-bounces at r-project.org>> on behalf of Rami Krispin <rami.krispin at gmail.com<mailto:rami.krispin at gmail.com>> Sent: February 7, 2018 1:32:37 PM To: Uwe Ligges Cc: r-package-devel at r-project.org<mailto: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: https://win-builder.r-project.org/incoming_pretest/180207_135041_TSstudio_011/00check.log and here is an example of the function that triggers that warning https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R Thanks! On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges <ligges at statistik.tu-dortmund.de<mailto:ligges at statistik.tu-dortmund.de> > wrote: > Not sure where you get the warning. I guess only at places where you still > 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 function >> 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 the >> 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<mailto: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<mailto:R-package-devel at r-project.org> mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Instead of help(oldFunction) giving the example
oldFunction(x = something, option = "XYZ")
show the user, via comments in the example, how to convert the old usage to
the new
# replace oldFunction(x = something, option = "XYZ") by
newFunction(object = log(something), method = "XYZ-log")
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Feb 7, 2018 at 10:49 AM, Rami Krispin <rami.krispin at gmail.com>
wrote:
I follow the example of the R Packages book about depreciating a function which can be find here: http://r-pkgs.had.co.nz/release.html Is there another method to rename a function name? maybe to print message without triggering warning? Thanks! 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. Best, Max ------------------------------ *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: https://win-builder.r-project.org/incoming_pretest/180207_ 135041_TSstudio_011/00check.log and here is an example of the function that triggers that warning https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R Thanks! On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges
<ligges at statistik.tu-dortmund.
de
wrote:
Not sure where you get the warning. I guess only at places where you
still
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
function
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
the
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 https://stat.ethz.ch/mailman/listinfo/r-package-devel
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Thanks for all the answers, I modified it to print function and it fixed the problem. Best regards, Rami Krispin
On Wed, Feb 7, 2018 at 3:44 PM, William Dunlap <wdunlap at tibco.com> wrote:
Instead of help(oldFunction) giving the example
oldFunction(x = something, option = "XYZ")
show the user, via comments in the example, how to convert the old usage
to the new
# replace oldFunction(x = something, option = "XYZ") by
newFunction(object = log(something), method = "XYZ-log")
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Feb 7, 2018 at 10:49 AM, Rami Krispin <rami.krispin at gmail.com>
wrote:
I follow the example of the R Packages book about depreciating a function which can be find here: http://r-pkgs.had.co.nz/release.html Is there another method to rename a function name? maybe to print message without triggering warning? Thanks! 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. Best, Max ------------------------------ *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: https://win-builder.r-project.org/incoming_pretest/180207_ 135041_TSstudio_011/00check.log and here is an example of the function that triggers that warning https://github.com/RamiKrispin/TSstudio/blob/master/R/ts_seasonal.R Thanks! On Wed, Feb 7, 2018 at 10:54 AM, Uwe Ligges
<ligges at statistik.tu-dortmund.
de
wrote:
Not sure where you get the warning. I guess only at places where you
still
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
function
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
the
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 https://stat.ethz.ch/mailman/listinfo/r-package-devel
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
On 08/02/18 07:49, Rami Krispin wrote:
I follow the example of the R Packages book about depreciating a function
<SNIP> It would be helpful if you were to distinguish between the words "deprecate" and "depreciate". They are *VERY* different words. cheers, Rolf Turner
Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276