Skip to content
Prev 51247 / 63435 Next

Puzzled by eval

On 06/11/2015 7:36 AM, Therneau, Terry M., Ph.D. wrote:
I haven't followed through all the details in fred(), but I can answer 
the last question.  In package code, the search order is:

- the package environment
- the imports to the package (with base being an implicit import)
- the global environment and the rest of the search list.

In code sourced to the global environment, only the third of these is 
searched.  Since base is in the second one, it is found first in the 
package version.

Duncan Murdoch