Re: [Rd] dput(as.list(function...)...) bug

2009-03-24 Thread Duncan Murdoch
On 3/24/2009 10:02 AM, Stavros Macrakis wrote: Peter, Duncan, I understand that the missing value indicator is special and will not behave like an ordinary value in evaluation. I was only discussing its handling in the text representation functions dput and dump. Duncan, You are absolutely rig

Re: [Rd] dput(as.list(function...)...) bug

2009-03-24 Thread Stavros Macrakis
Peter, Duncan, I understand that the missing value indicator is special and will not behave like an ordinary value in evaluation. I was only discussing its handling in the text representation functions dput and dump. Duncan, You are absolutely right that "list(x=)" is parseable (though not evalu

Re: [Rd] dput(as.list(function...)...) bug

2009-03-24 Thread Peter Dalgaard
Duncan Murdoch wrote: On 23/03/2009 7:37 PM, Stavros Macrakis wrote: It appears to be the zero-length name: is.name(ff$x) => TRUE as.character(ff$x) => "" This may give you a hint: > y <- ff$x > y Error: argument "y" is missing, with no default It's a special internal thing th

Re: [Rd] dput(as.list(function...)...) bug

2009-03-23 Thread William Dunlap
> -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Duncan Murdoch > Sent: Monday, March 23, 2009 5:28 PM > To: Stavros Macrakis > Cc: r-devel@r-project.org > Subject: Re: [Rd] dput(as.list(function...).

Re: [Rd] dput(as.list(function...)...) bug

2009-03-23 Thread Duncan Murdoch
On 23/03/2009 7:37 PM, Stavros Macrakis wrote: Tested in R 2.8.1 Windows ff <- formals(function(x)1) ff1 <- as.list(function(x)1)[1] # ff1 acts the same as ff in the examples below, but is a list rather than a pairlist dput( ff , control=c("warnIncomplete")) list(x = ) This string is not p

Re: [Rd] dput(as.list(function...)...) bug

2009-03-23 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > Tested in R 2.8.1 Windows > > >> ff <- formals(function(x)1) >> ff1 <- as.list(function(x)1)[1] >> > # ff1 acts the same as ff in the examples below, but is a list rather > than a pairlist > > >> dput( ff , control=c("warnIncomplete")) >> > list(x = ) > > T

[Rd] dput(as.list(function...)...) bug

2009-03-23 Thread Stavros Macrakis
Tested in R 2.8.1 Windows > ff <- formals(function(x)1) > ff1 <- as.list(function(x)1)[1] # ff1 acts the same as ff in the examples below, but is a list rather than a pairlist > dput( ff , control=c("warnIncomplete")) list(x = ) This string is not parsable, but dput does not give a warning as sp