Re: [Rd] Puzzled by eval

2015-11-06 Thread Hadley Wickham
On Fri, Nov 6, 2015 at 8:20 AM, Therneau, Terry M., Ph.D. wrote: > Duncan, > That's helpful. Two follow-up questions: > 1. Where would I have found this information? I had looked at eval and > model.frame. You can try http://adv-r.had.co.nz/Environments.html, particularly http://adv-r.had.co.

Re: [Rd] Puzzled by eval

2015-11-06 Thread Gabor Grothendieck
This code which I think I wrote but might have gotten from elsewhere a long time ago shows the environments that are searched from a given function, in this case chart.RelativePerformance in PerformanceAnalytics package. Try it on some of your functions in and out of packages to help determine th

Re: [Rd] Puzzled by eval

2015-11-06 Thread Duncan Murdoch
On 06/11/2015 8:20 AM, Therneau, Terry M., Ph.D. wrote: Duncan, That's helpful. Two follow-up questions: 1. Where would I have found this information? I had looked at eval and model.frame. I think the best description is Luke's article on namespaces, "Name space management for R". Luke

Re: [Rd] Puzzled by eval

2015-11-06 Thread Therneau, Terry M., Ph.D.
Duncan, That's helpful. Two follow-up questions: 1. Where would I have found this information? I had looked at eval and model.frame. 2. What stops the following code from falling down the same rabbit hole? Shouldn't it find base::cos first? library(survival) cos <- lung coxph(Sur

Re: [Rd] Puzzled by eval

2015-11-06 Thread Duncan Murdoch
On 06/11/2015 7:36 AM, Therneau, Terry M., Ph.D. wrote: I am currently puzzled by a seach path behavior. I have a library of a dozen routines getlabs(), getssn(), getecg(), ... that interface to local repositories and pull back patient information. All have a the first 6 arguments in common,