re: [S] delimiting strings

Bill Venables (wvenable@attunga.stats.adelaide.edu.au)
Thu, 22 Oct 1998 08:41:25 +0930


>>>>> "Scott" == Scott Chasalow <Scott.Chasalow@USERS.PV.WAU.NL> writes:

Scott> You could have found this function with, e.g.

>> lapply(search(), objects, pat = "*paste*"),

Scott> assuming, of course, you had guessed that "paste" was
Scott> in the function name.

Nice detective work, Scott (which should not have been necessary,
of course). I didn't know of it either, and I thought I had made
a real effort to dig around in all the little nooks and crannies.
It makes you wonder what other little gems still lie hidden.

For the record, Unix people need to use a different pattern
matching regular expression:

> unlist(lapply(search(), objects, pat=".*paste.*"))
[1] "paste.fun.frame" "unpaste" "paste"

(I've checked, `paste.fun.frame' really isn't likely to be of
much direct use...)

Another often partially overlooked group are those that start
with "un..."

> unlist(lapply(search, objects, pat = "^un.*$") # again, only Unix

-- 
_________________________________________________________________
Bill Venables, Head, Dep't of Statistics,   Tel.: +61 8 8303 5418
The University of Adelaide,                 Fax.: +61 8 8303 3696
South AUSTRALIA.     5005.   Email: Bill.Venables@adelaide.edu.au
-----------------------------------------------------------------------
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