| To: | Kamil Toth <kamiltoth@yahoo.com> |
|---|---|
| Subject: | Re: locate text in function(s) |
| From: | carr.gj@pg.com |
| Date: | Wed, 7 Dec 2005 16:02:09 -0500 |
| Cc: | "s-news@lists.biostat.wustl.edu" <s-news@lists.biostat.wustl.edu> |
| Pgsenderhost: | bdc-notes041.na.pg.com [155.125.116.41] |
|
I may be among the "smart people": functionString<-function(candidates,string){ ###candidates is character vector (names of objects) ###string is text to be matched (regular _expression_) results<-logical(length(candidates)) for (i in seq(along=candidates)){ if (is.function(get(candidates[i]))){ if (any(regexpr(string,deparse(get(candidates[i])))>0)) results[i]<-T } } candidates[results] } ##example (checks all objects in first pos of search list) functionString(objects(),string="data\\.frame")
Folks: Suppose that I have several hundred functions in one project, and I need to quickly locate which of them contains a specific text, say "my.SPLINE". Is there any regular way of doing this? If not, what would you, smart people, do to fulfil this task? Thanks Kamil Toth
Yahoo! Personals Let fate take it's course directly to your email. See who's waiting for you Yahoo! Personals
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: locate text in function(s), P Ehlers |
|---|---|
| Next by Date: | Function for summarizing the table to two factors and a frequency, Jagadish Rangrej |
| Previous by Thread: | Re: locate text in function(s), P Ehlers |
| Next by Thread: | Function for summarizing the table to two factors and a frequency, Jagadish Rangrej |
| Indexes: | [Date] [Thread] [Top] [All Lists] |