>>>>> "KWri" == Wright, Kevin <WRIGHTKEVI@phibred.com> writes:
KWri> As (also) a former UNIX diehard, I much prefer "ls" to "objects".
When I
KWri> look at the code for "ls" I see:
--> ls
KWri> function(pattern = "", pos = 1)
KWri> {
KWri> if(pattern != "")
KWri> stop("ls() is deprecated; patterns not allowed; use objects()")
KWri> objects(pos)
KWri> }
KWri> Now, this is most curious. Why didn't MathSoft provide us with this
KWri> revision of "ls"?
KWri> ls_function(pattern = "", pos = 1)
KWri> {
KWri> objects(pos,pattern=pattern)
KWri> }
because "pattern" in ls() and objects() have very different meaning:
"pattern" for ls means "wildcards"
"pattern" for objects() means "regular expressions" [aka "regex(p)"s].
{the documentation ?objects mentions ?grep
and grep mentions reg.exp.s}
BTW: In R {www.r-project.org},
ls & objects are synonymous {and pattern always means "regexp"}.
Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|