Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-31 Thread Martin Oliver Sailer
Dear all, thanks for the advice. The latest version of crossdes (1.0-8) on CRAN now has namespaces. Hope this helps. Regards Oliver Sailer Duncan Murdoch schrieb: On 30/03/2008 8:43 AM, Michael Kubovy wrote: Thanks, Duncan, I started a new session under the suspicion that packages were

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Duncan Murdoch
On 30/03/2008 8:43 AM, Michael Kubovy wrote: Thanks, Duncan, I started a new session under the suspicion that packages were clashing. ... # # BAD INTERACTION BETWEEN alr3 and AlgDesign # What now? There's not much you can do; this is up to the package authors to fix.

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Gabor Grothendieck
On Sun, Mar 30, 2008 at 9:43 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: In my opinion, all packages should have namespaces, and I'd like to create a default one if the author doesn't. (The default would be: import what is listed in the Depends clause, export everything.) I don't think this

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Michael Kubovy
Hi Duncan, Yes, I came to realize that ifelse was not the way to go. Here is how I dealt with it: if(sum('AlgDesign' == (.packages())) 0) detach('package:AlgDesign') It requires me (and my students) to learn only the (.packages()) construct (and avoid knowing anything about search(),

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Duncan Murdoch
On 30/03/2008 11:31 AM, Gabor Grothendieck wrote: On Sun, Mar 30, 2008 at 9:43 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: In my opinion, all packages should have namespaces, and I'd like to create a default one if the author doesn't. (The default would be: import what is listed in the

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Duncan Murdoch
On 30/03/2008 10:06 AM, Michael Kubovy wrote: I've been trying to dynamically detach and attach things in my Sweave, in order to circumvent the problem. Here is my first attempt: pkg - 'package:AlgDesign' p - is.na(match(pkg, search())) ifelse(p == FALSE, detach(pkg), NA) You can't use