Re: [Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-23 Thread Bill.Venables
[EMAIL PROTECTED] (i.e. I) wrote: > 3. Modify substitute() so that it strips source attributes (or anything > else apparently visible that it will not manipulate) from objects. > Sorry folks, too dangerous. (I concede this appears to be a bit of an > overkill, too.) Peter Dalgaard responded:

Re: [Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-23 Thread murdoch
ll Venables. >> >> -Original Message----- >> From: Peter Dalgaard [mailto:[EMAIL PROTECTED] >> Sent: Friday, 22 December 2006 9:47 PM >> To: Venables, Bill (CMIS, Cleveland) >> Cc: r-devel@stat.math.ethz.ch; [EMAIL PROTECTED] >> Subject: Re: [Rd] substitu

Re: [Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-23 Thread Duncan Murdoch
ll Venables. >> >> -Original Message----- >> From: Peter Dalgaard [mailto:[EMAIL PROTECTED] >> Sent: Friday, 22 December 2006 9:47 PM >> To: Venables, Bill (CMIS, Cleveland) >> Cc: r-devel@stat.math.ethz.ch; [EMAIL PROTECTED] >> Subject: Re: [Rd] substitu

Re: [Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-23 Thread Peter Dalgaard
be dangerous in this way, both in the help informaton for options() > and for substitute(). > > ? > > Bill Venables. > > -Original Message- > From: Peter Dalgaard [mailto:[EMAIL PROTECTED] > Sent: Friday, 22 December 2006 9:47 PM > To: Venables, Bill (CMIS, Cleve

Re: [Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-22 Thread Bill.Venables
Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: Friday, 22 December 2006 9:47 PM To: Venables, Bill (CMIS, Cleveland) Cc: r-devel@stat.math.ethz.ch; [EMAIL PROTECTED] Subject: Re: [Rd] substitute creates an object which prints incorrectly (PR#9427) [EMAIL PROTECTED] wrote: > The function &qu

Re: [Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-22 Thread Gabor Grothendieck
Try issuing the command: options(keep.source = FALSE) prior to running the code you displayed to force the actual source, rather than the source attribute, to be displayed by print when printing functions. On 12/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The function "substitute" s

Re: [Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-22 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > The function "substitute" seems to fail to make a genuine > substitution, although the printed verision seems fine. Here is an > example. > > >> m <- substitute(Y <- function(x) FUN(x+1), >> > + list(Y = as.name("y"), FUN = as.name("sin"))) > >> m >> > y

[Rd] substitute creates an object which prints incorrectly (PR#9427)

2006-12-22 Thread Bill . Venables
The function "substitute" seems to fail to make a genuine substitution, although the printed verision seems fine. Here is an example. > m <- substitute(Y <- function(x) FUN(x+1), + list(Y = as.name("y"), FUN = as.name("sin"))) > m y <- function(x) sin(x + 1) > eval(m) > y function(x) FUN(x+1) H