From ligges at statistik.tu-dortmund.de  Tue Jun  1 22:19:07 2010
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Tue, 01 Jun 2010 22:19:07 +0200
Subject: [Rd] Suggested tidying up
In-Reply-To: <4C4C31FF-4FAC-41F9-87ED-F09804FD2CCB@act.ulaval.ca>
References: <4C4C31FF-4FAC-41F9-87ED-F09804FD2CCB@act.ulaval.ca>
Message-ID: <4C056B3B.6040804@statistik.tu-dortmund.de>



On 31.05.2010 23:13, Vincent Goulet wrote:
> Package grDevices has a function cm() to convert from inches to centimeters. Its definition is:
>
> cm<- function(x) 2.54*x
>
> As far as I can tell, the function is not used anywhere in the R sources (I grepped for "cm(", "cm)" and ", cm".) I did not check for all packages on CRAN, though.

I found it easier to remember cm() rather than 2.54.

By the way, before deprecating (rather than at once removing) a 
function: have you also grepped through all CRAN and BioC packages?
And have you grepped for "\"cm\"", "'cm'" and other occurrences? cm may 
be called in a call(), do.call() or other construct, hence the real test 
is to remove the cm function, rebuild R and run the checks and run 
checks on all at least all 3000 packages from CRAN + BioC.

Best wishes,
Uwe Ligges



> May I propose to remove this apparently useless function from the sources?
>
> [I stubbled upon this function because my package actuar also has a cm() function that masks the one from grDevices.]
>
>
> Dr. Vincent Goulet
> Full Professor
> ?cole d'actuariat, Universit? Laval, Qu?bec
> vincent.goulet at act.ulaval.ca   http://vgoulet.act.ulaval.ca
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Suggested tidying up
Uwe Ligges