how to deal with deprecated functions

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to deal with deprecated functions

Nestor Toledo
Hello everyone, even I'm not fluent in coding, R has become a
fundamental part of my daily work as a researcher and I'm very much
grateful for such a wonderful, open tool. However, I have faced in many
opportunities the problems associated with updates/upgrades of packages.
Frequently packages developers modify command syntax or directly
deprecate entire functions. This becomes a nuisance, since I must to
recode my scripts partially or totally, or even search for alternative
functions in other packages. Is there any solution to this, other than
skip updates or keeping old versions installed in a different folder?
Could be acceptable ask developers to do not deprecate functions but
keep them as "legacy" ones or similar?

Thanks in advance and I apologize for my deficient English grammar

--
Dr. Néstor Toledo
División Paleontología Vertebrados
[hidden email]
Unidades de Investigación Anexo Museo FCNyM-UNLP
Av. 60 y 122
B1900FWA (B1906CXT)  La Plata, Argentina
Tel. 54 221 422 8451 int 115 of 115
https://www.researchgate.net/profile/Nestor_Toledo
http://sedici.unlp.edu.ar/handle/10915/55101

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: how to deal with deprecated functions

Rui Barradas
Hello,

If you are talking about CRAN packages, like it seems you are, then
there is no general purpose solution. What is deprecated depends on each
package's team of developers/maintainer.

Since R is open source and so must be all CRAN packages, a possible
solution is to have your own package of deprecated functions. This
package could be used while you don't recode your scripts, or even used
for ever, as long as those functions, maybe with a different name,  do
not conflict with the new behavior of the rest of the packages they came
from. Is not that difficult to write a package, and in this case you
would even have more examples, if needed.


Hope this helps,

Rui Barradas

Às 19:07 de 04/12/19, Nestor Toledo escreveu:

> Hello everyone, even I'm not fluent in coding, R has become a
> fundamental part of my daily work as a researcher and I'm very much
> grateful for such a wonderful, open tool. However, I have faced in many
> opportunities the problems associated with updates/upgrades of packages.
> Frequently packages developers modify command syntax or directly
> deprecate entire functions. This becomes a nuisance, since I must to
> recode my scripts partially or totally, or even search for alternative
> functions in other packages. Is there any solution to this, other than
> skip updates or keeping old versions installed in a different folder?
> Could be acceptable ask developers to do not deprecate functions but
> keep them as "legacy" ones or similar?
>
> Thanks in advance and I apologize for my deficient English grammar
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: how to deal with deprecated functions

J C Nash
I would second Rui's suggestion. However, as a package developer and maintainer, I think
it is important to note that users need to be encouraged to use good tools. I work with optimization
codes. My software was incorporated into the optim() function a LONG time ago. I have updated
and expanded the methods in packages, particularly optimx. But CRAN regularly imposes new
standards. Worse, there are recent changes in gfortran which may or may not be justified.
In the last couple of months, I've had several messages from CRAN to "fix" my packages,
though likely there is nothing "wrong" with the code, but it doesn't have quite the right
setup for the altered R. Within reason, I'm willing to do a bit of cleanup from time to
time. And to add new features and capabilities as I am able.

For users, there is another lurking danger. I've been merging some of my packages to reduce the
number I have to maintain. I retired from teaching in 2008, so it is not unimaginable that
there might not be a maintainer rather suddenly. I've had users send quite rude messages
"Why don't you fix this program". Well, some maintainers will gladly do so if you arrange their
resurrection.

More realistically, it has always been time for younger members of the R community to team up
with older ones so we have a succession plan. Current CRAN seems fixated on single person
maintainers, but I think CRAN and other open-source projects need to consider
group maintenance -- several people maintaining several packages. That isn't picking a
fight with the CRAN folk -- things evolved and it is difficult to change a working system.

JN


On 2019-12-05 9:49 a.m., Rui Barradas wrote:

> Hello,
>
> If you are talking about CRAN packages, like it seems you are, then there is no general purpose solution. What is
> deprecated depends on each package's team of developers/maintainer.
>
> Since R is open source and so must be all CRAN packages, a possible solution is to have your own package of deprecated
> functions. This package could be used while you don't recode your scripts, or even used for ever, as long as those
> functions, maybe with a different name,  do not conflict with the new behavior of the rest of the packages they came
> from. Is not that difficult to write a package, and in this case you would even have more examples, if needed.
>
>
> Hope this helps,
>
> Rui Barradas
>
> Às 19:07 de 04/12/19, Nestor Toledo escreveu:
>> Hello everyone, even I'm not fluent in coding, R has become a fundamental part of my daily work as a researcher and
>> I'm very much grateful for such a wonderful, open tool. However, I have faced in many opportunities the problems
>> associated with updates/upgrades of packages. Frequently packages developers modify command syntax or directly
>> deprecate entire functions. This becomes a nuisance, since I must to recode my scripts partially or totally, or even
>> search for alternative functions in other packages. Is there any solution to this, other than skip updates or keeping
>> old versions installed in a different folder? Could be acceptable ask developers to do not deprecate functions but
>> keep them as "legacy" ones or similar?
>>
>> Thanks in advance and I apologize for my deficient English grammar
>>
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: how to deal with deprecated functions

Duncan Murdoch-2
In reply to this post by Nestor Toledo
On 04/12/2019 2:07 p.m., Nestor Toledo wrote:

> Hello everyone, even I'm not fluent in coding, R has become a
> fundamental part of my daily work as a researcher and I'm very much
> grateful for such a wonderful, open tool. However, I have faced in many
> opportunities the problems associated with updates/upgrades of packages.
> Frequently packages developers modify command syntax or directly
> deprecate entire functions. This becomes a nuisance, since I must to
> recode my scripts partially or totally, or even search for alternative
> functions in other packages. Is there any solution to this, other than
> skip updates or keeping old versions installed in a different folder?
> Could be acceptable ask developers to do not deprecate functions but
> keep them as "legacy" ones or similar?
>
> Thanks in advance and I apologize for my deficient English grammar
>

As Rui said, there's no easy way to prevent this.  In my experience,
most maintainers are quite willing to avoid changes that cause problems,
or help users to work around them:  but they have to know that problems
were caused.

The easiest way to do this is to share your own code by putting it in a
package on CRAN with sufficient tests to detect problems.  When a
package maintainer submits a package update, CRAN checks that all
"revdeps" (i.e. reverse dependencies, packages that depend on the
updated one) still pass their tests.  The submitter is asked to contact
the maintainers of the other packages to resolve any new problems.

Duncan Murdoch

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: how to deal with deprecated functions

Nestor Toledo
Ok I understand. I wasn't intended to look as complaining, sorry.

 It was interesting to get the pointview of a developer (thanks JC Nash).
To code a new package comprising useful but deprecated functions is a very
good advice, thanks, I will try to hone my coding skills to do so (and to
be more involved with the R community as well).

Thanks again for your feedback



Dr. Néstor Toledo
División Paleontología Vertebrados
[hidden email]
Unidades de Investigación Anexo Museo FCNyM-UNLP
Av. 60 y 122 B1900FWA (B1906CXT) La Plata, Argentina
Tel. 54 221 422 8451 int 115 of 115
http://sedici.unlp.edu.ar/handle/10915/55101

El jue., 5 de dic. de 2019 14:16, Duncan Murdoch <[hidden email]>
escribió:

> On 04/12/2019 2:07 p.m., Nestor Toledo wrote:
> > Hello everyone, even I'm not fluent in coding, R has become a
> > fundamental part of my daily work as a researcher and I'm very much
> > grateful for such a wonderful, open tool. However, I have faced in many
> > opportunities the problems associated with updates/upgrades of packages.
> > Frequently packages developers modify command syntax or directly
> > deprecate entire functions. This becomes a nuisance, since I must to
> > recode my scripts partially or totally, or even search for alternative
> > functions in other packages. Is there any solution to this, other than
> > skip updates or keeping old versions installed in a different folder?
> > Could be acceptable ask developers to do not deprecate functions but
> > keep them as "legacy" ones or similar?
> >
> > Thanks in advance and I apologize for my deficient English grammar
> >
>
> As Rui said, there's no easy way to prevent this.  In my experience,
> most maintainers are quite willing to avoid changes that cause problems,
> or help users to work around them:  but they have to know that problems
> were caused.
>
> The easiest way to do this is to share your own code by putting it in a
> package on CRAN with sufficient tests to detect problems.  When a
> package maintainer submits a package update, CRAN checks that all
> "revdeps" (i.e. reverse dependencies, packages that depend on the
> updated one) still pass their tests.  The submitter is asked to contact
> the maintainers of the other packages to resolve any new problems.
>
> Duncan Murdoch
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.