Re: [Rd] How to deal with package conflicts

2011-11-24 Thread Duncan Murdoch
On 11-11-24 4:44 PM, Michael Friendly wrote: In my genridge package, I define a function ridge() for ridge regression, creating objects of class 'ridge' that I intend to enhance. In a documentation example, I want to use some functions from the car package. However, that package requires surviva

[Rd] How to deal with package conflicts

2011-11-24 Thread Michael Friendly
In my genridge package, I define a function ridge() for ridge regression, creating objects of class 'ridge' that I intend to enhance. In a documentation example, I want to use some functions from the car package. However, that package requires survival, which also includes a ridge() function, f

Re: [Rd] Confused about NAMED

2011-11-24 Thread Simon Urbanek
On Nov 24, 2011, at 1:48 PM, Prof Brian Ripley wrote: > On Thu, 24 Nov 2011, Simon Urbanek wrote: > >> >> On Nov 24, 2011, at 8:05 AM, Matthew Dowle wrote: >> On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: >> >> On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: >>

Re: [Rd] Confused about NAMED

2011-11-24 Thread Prof Brian Ripley
On Thu, 24 Nov 2011, Simon Urbanek wrote: On Nov 24, 2011, at 8:05 AM, Matthew Dowle wrote: On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: Hi, I expected NAMED to be 1 in all these three cases. It is for one of them, but not the other

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 8:05 AM, Matthew Dowle wrote: > >>> >>> On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: >>> > > On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: > >> Hi, >> >> I expected NAMED to be 1 in all these three cases. It is for one of >> them, >> bu

Re: [Rd] Confused about NAMED

2011-11-24 Thread luke-tierney
The details of complex assignment expressions are fairly intricate. I wrote up some notes ont his a couple of months back and have meant to get them into the internals manual but have not gotten around to it yet. I'll see if I can get to it in the next week or two and will send a note to this th

Re: [Rd] Confused about NAMED

2011-11-24 Thread Simon Urbanek
On Nov 24, 2011, at 8:05 AM, Matthew Dowle wrote: >> >> On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: >> On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: > Hi, > > I expected NAMED to be 1 in all these three cases. It is for one of > them, > but not the

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 14:05 , Matthew Dowle wrote: > >> Since list() is primitive I tried to construct a data.frame starting >> with >> list() [since structure() isn't primitive], but then merely adding an >> attribute seems to set NAMED==2 too ? > > Yes. As soon as there is the slightest risk of

Re: [Rd] Confused about NAMED

2011-11-24 Thread peter dalgaard
On Nov 24, 2011, at 14:05 , Matthew Dowle wrote: > Since list() is primitive I tried to construct a data.frame starting with > list() [since structure() isn't primitive], but then merely adding an > attribute seems to set NAMED==2 too ? Yes. As soon as there is the slightest risk of having (had)

Re: [Rd] capture.output(eval(..., envir)) not evaluate in the expected(?) environment

2011-11-24 Thread Simon Urbanek
On Nov 23, 2011, at 11:06 PM, Henrik Bengtsson wrote: > Thanks for the quick answer. I didn't know about force() function. > It doesn't matter how you force the argument, anything - e.g. if(is.environment(envir)) capture.output(...) would do - I used force() just to make the point that it is

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: > >>> >>> On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: >>> Hi, I expected NAMED to be 1 in all these three cases. It is for one of them, but not the other two? > R --vanilla R version 2.14.0 (2011-10-31)

Re: [Rd] Confused about NAMED

2011-11-24 Thread peter dalgaard
On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: >> >> On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: >> >>> Hi, >>> >>> I expected NAMED to be 1 in all these three cases. It is for one of >>> them, >>> but not the other two? >>> R --vanilla >>> R version 2.14.0 (2011-10-31) >>> Platfo

Re: [Rd] Confused about NAMED

2011-11-24 Thread Duncan Murdoch
On 11-11-24 6:34 AM, Matthew Dowle wrote: On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: Hi, I expected NAMED to be 1 in all these three cases. It is for one of them, but not the other two? R --vanilla R version 2.14.0 (2011-10-31) Platform: i386-pc-mingw32/i386 (32-bit) x = 1L .Intern

Re: [Rd] Changing graphic titles when using bquote and resizing the graphic window

2011-11-24 Thread Prof Brian Ripley
(Why is this an R-devel topic?) When you resize a plot (and sometimes when the graph is repainted), the display list is replay-ed. So if you force delayed evaluation, you get evaluation when the list is replay-ed. So the 'strange' thing is that you think delaying evaluation is a good idea.

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: > >> Hi, >> >> I expected NAMED to be 1 in all these three cases. It is for one of >> them, >> but not the other two? >> >>> R --vanilla >> R version 2.14.0 (2011-10-31) >> Platform: i386-pc-mingw32/i386 (32-bit) >> >>> x = 1L >>> .Internal(inspe

Re: [Rd] Confused about NAMED

2011-11-24 Thread peter dalgaard
On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: > Hi, > > I expected NAMED to be 1 in all these three cases. It is for one of them, > but not the other two? > >> R --vanilla > R version 2.14.0 (2011-10-31) > Platform: i386-pc-mingw32/i386 (32-bit) > >> x = 1L >> .Internal(inspect(x)) # why

[Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
Hi, I expected NAMED to be 1 in all these three cases. It is for one of them, but not the other two? > R --vanilla R version 2.14.0 (2011-10-31) Platform: i386-pc-mingw32/i386 (32-bit) > x = 1L > .Internal(inspect(x)) # why NAM(2)? expected NAM(1) @2514aa0 13 INTSXP g0c1 [NAM(2)] (len=1, tl=0)

[Rd] Changing graphic titles when using bquote and resizing the graphic window

2011-11-24 Thread Mathieu Ribatet
Dear list, I found a strange behavior of the graphic display when using bquote to set a title to a plot. The problem arise when you manually resize the graphic window using the mouse. It happens on both quartz and x11 devices. Here's a reproducible example: par(mfrow = c(1,3)) for (i in 1:3){