[R] How to get the definition of a function if it is masked by a variable?

thmsfuller066 at gmail.com thmsfuller066 at gmail.com
Fri May 28 20:54:41 CEST 2010


Hello,

Normally, if I type a function name, it shows the function definition.
When the function is masked by a variable with the same name, it
doesn't show the function definition any more. Can anyone please tell
me a way how to retrieve the function definition even if it is masked
by a variable?

> x=1:3
> length(x)
[1] 3
> length
function (x)  .Primitive("length")
> length=10
> length
[1] 10
> length(x)
[1] 3

-- 
Tom



More information about the R-help mailing list