From laurent.gatto at gmail.com  Tue Jun 11 13:02:39 2013
From: laurent.gatto at gmail.com (Laurent Gatto)
Date: Tue, 11 Jun 2013 12:02:39 +0100
Subject: [Rd] Policy/best practices on renaming functions in packages
In-Reply-To: <CABG0rfv+9YTujngdCH-b11iouX+VnJtXjFWue2d083TXrKY3GQ@mail.gmail.com>
References: <CABG0rfv+9YTujngdCH-b11iouX+VnJtXjFWue2d083TXrKY3GQ@mail.gmail.com>
Message-ID: <CA+uNOzgTS2k2tTX_RK5x8Zg5eMXvqR7+XA8N-7ykstekDK66Mw@mail.gmail.com>

On 10 June 2013 17:23, Jonathan Greenberg <jgrn at illinois.edu> wrote:
> R-developers:
>
> I'm beginning to work on a manuscript for a set of functions I
> developed for a package I have on CRAN (spatial.tools), and I'd like
> to rename a function in my package to give a better idea of what it
> does prior to manuscript submission -- is there a "safe" way to do a
> backwards-compatible rename of a function within a CRAN package (so
> functions that rely on the original name aren't broken)?  Is it as
> simple as:
>
> new_name <- old_name <- function(yadda)
> {
>
> }
>
> In general, I'd just leave it as is, but the old name of the function
> was a reference to an existing function in another package that it no
> longer has any resemblance to.

I think that the recommended way is to start with base::.Deprecated
and then more on with base::Defunct.

This guide, http://bioconductor.org/developers/how-to/deprecation/,
although from the Bioconductor project, might be helpful.

Best wishes,

Laurent

> Thanks!
>
> --j
>
> --
> Jonathan A. Greenberg, PhD
> Assistant Professor
> Global Environmental Analysis and Remote Sensing (GEARS) Laboratory
> Department of Geography and Geographic Information Science
> University of Illinois at Urbana-Champaign
> 607 South Mathews Avenue, MC 150
> Urbana, IL 61801
> Phone: 217-300-1924
> http://www.geog.illinois.edu/~jgrn/
> AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



--
[ Laurent Gatto | slashhome.be ]



[Rd] Policy/best practices on renaming functions in packages
Laurent Gatto