On Thu, Jan 19, 2012 at 4:11 PM, William Dunlap <wdun...@tibco.com> wrote: >> That's the only thing I see, *except* that df() and drop() are base >> functions, >> so you shouldn't use those as variable names. > > I don't think that is much of a problem. The local > versions will be used in the function.
Yes, but somewhere in the series of emails the original querent was talking about running the function line by line to see if each bit worked, a common debugging method. It's generally safer to not use base functions as names (see the many questions to the list due to using c as a name). (Or actually, I'm not entirely certain that's what he meant, but that's how interpreted one of the vague statements.) > A bigger problem is naming your function 'drop.levels'. > There is a core R function called 'droplevels' that drops > unused levels from factors. I would hate to have to > remember the difference between the dotted and dotless > versions. Definitely confusing if this ever gets used beyond the single person who wrote it. Sarah -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list 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.