Recent R function names seem to be using CaseOfTheLetters to mark words rather than dots as was done previously. Is the use of dots in function names deprecated, or is that simply a style choice? Will function names with dots cause problems in future revisions? Mike Prager
On Fri, 30 Sep 2005, Mike Prager wrote:> Recent R function names seem to be using CaseOfTheLetters to mark words > rather than dots as was done previously. Is the use of dots in function > names deprecated, or is that simply a style choice? Will function names > with dots cause problems in future revisions? >There are, and always have been, problems with using dots because of the way S3 methods work. These are getting worse as more functions become generic but are getting better as more methods are in namespaces and thus registered. I don't expect dots to go away any time soon, so the choice between name.with.dots(), name_with_underscores(), runonname(), and nameCamelCased() is really a stylistic one. -thomas
"Mike Prager" <Mike.Prager at noaa.gov> writes:> Recent R function names seem to be using CaseOfTheLetters to mark words > rather than dots as was done previously. Is the use of dots in function > names deprecated, or is that simply a style choice? Will function names > with dots cause problems in future revisions?Well, come the S4 revolution and dots will cause trouble no more... The main reason dots have fallen from grace is that they cause ambiguity in relation to S3 methods. In a nutshell: t.test is not a transpose method for objects of class "test". Since we check S3 methods automatically, it is problematic to keep track of things that look like S3 methods without being so. Check out .make_S3_methods_stop_list() (in the tools package). -- O__ ---- Peter Dalgaard ??ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907