From saikat at stat.wisc.edu  Thu Oct  9 12:41:01 2003
From: saikat at stat.wisc.edu (Saikat DebRoy)
Date: Thu Oct  9 17:39:11 2003
Subject: [Rd] An artifact of base being namespace
Message-ID: <FC2BADAC-FA6E-11D7-92F4-0003931A3C9E@stat.wisc.edu>

Function in the base library of R 1.8.0 seems to use a search path with 
base coming before the local environment. I think this is intentional 
and is related to base being a namespace.

 > log <- function(x, base) 200
 > log(1)
[1] 200
 > log10
function (x)
log(x, 10)
<environment: namespace:base>
 > log10(1)
[1] 0
 >

This is most problematic when you are creating a generic for an 
existing function in base (as you very well could for log). This often 
makes the ability to make new generics out of existing functions 
somewhat useless.


[Rd] An artifact of base being namespace
Saikat DebRoy