Re: [R] what's going on here with substitute() ?

2003-10-24 Thread Tony Plate
[resent the next day, after not appearing on the list] Peter, thank you for the explanation. This is indeed what is happening. Might I suggest the following passage for inclusion in the help page for "function", and possibly also "body", in the DETAILS or WARNING section: "Note that the text o

Re: [R] what's going on here with substitute() ?

2003-10-23 Thread Peter Dalgaard
Tony Plate <[EMAIL PROTECTED]> 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 discard

[R] what's going on here with substitute() ?

2003-10-23 Thread Tony Plate
I was trying to create a function with a value computed at creation time, using substitute(), but I got results I don't understand: > this.is.R Error: Object "this.is.R" not found > substitute(this.is.R <- function() X, list(X=!is.null(options("CRAN")[[1]]))) this.is.R <- function() TRUE > # the