Dear useRs,

I have a utility function which is meant to be a clone of ls(), except
with the option all.names=TRUE.  Currently however, the function merely
consists of a copy of the source code of ls(), except the default value
of all.names is different.  That approach has the drawback of future
inconsistency if the code for ls() ever changes.  No comment on whether
that is likely or not; I would and do object to the current construction
in principle.

What I would like to do is rewrite the new function so that it does very
minimal processing of its arguments, and then calls ls() with the new
arguments, somewhat in the same spirit of the Recall() function.  

A challenge to me has been twofold, that this new ls() call has a
different search path, and that ls() itself has a good deal of lazy
evaluation (including possibly twice in one line, around line 11) in it.
Getting my new function to work with all permutations of arguments,
without merely copying the code from ls(), has been futile.  

I am sure I could manually enumerate the behavior for all permutations
of all the arguments to ls(), and code each case individually.  I am
also sure I will not waste my time doing that.  I was hoping, however,
that there was some simple trick to allow this easily, one that I have
missed.  Even an explanation of why this might be a fool's errand would
be quite helpful to my understanding of the intricacies of R evaluation.


Many thanks, 
John
John  Szumiloski,  Ph.D.

Senior Biometrician
Biometrics Research
WP53B-120
Merck Research Laboratories
P.O. Box 0004
West Point, PA 19486-0004

> (215) 652-7346 (PH)
> (215) 993-1835 (FAX)
> 
Notice:  This e-mail message, together with any attachme...{{dropped:15}}

______________________________________________
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.

Reply via email to