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.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to