[R] what's going on here with substitute() ?
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Thu Oct 23 21:12:12 CEST 2003
Tony Plate <tplate at blackmesacapital.com> writes:
> Why is the body of the function "X" when I substituted a different
> expression for X? Also, given that the body of the function is X, how
> does the function evaluate to TRUE since X is not defined anywhere
> (except in a list that should have been discarded.)
>
> This happens with both R 1.7.1 and R 1.8.0 (under Windows 2000).
>
> (yes, I did discover the function is.R(), but I still want to discover
> what's going here.)
I think you are defeating the keep.source mechanism. What you're
seeing is not the actual function but its source attribute. Try
attributes(this.is.R) <- NULL and see what happens.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list