[Rd] R 2.5.1 - ?factor examples, details

2007-07-02 Thread François Pinard
Hi, R people. In ?factor, in the "Examples:" section, we see: ## suppose you want "NA" as a level, and to allowing missing values. (x <- factor(c(1, 2, "NA"), exclude = "")) is.na(x)[2] <- TRUE x # [1] 1 NA, used because NA is a level. is.na(x) # [1] FALSE TRUE FALSE I'm a bit

Re: [Rd] minor flaw in integrate()

2007-07-02 Thread Duncan Murdoch
On 28/06/2007 5:05 PM, Peter Ruckdeschel wrote: > Hi, > > I noticed a minor flaw in integrate() from package stats: > > Taking up arguments lower and upper from integrate(), > >if (lower == Inf) && (upper == Inf) > >or > >if (lower == -Inf) && (upper == -Inf) > > integrate()

Re: [Rd] File lock mechanisms in R

2007-07-02 Thread François Pinard
[Henrik Bengtsson] >I am looking for a way to have one R session lock a file for >read/write access, while being updated/modified by another R session. >This will provide me with a-poor-mans parallelization method. It is >ok to have so called advisory looking (as in Unix), which are >non-mandator

[Rd] File lock mechanisms in R

2007-07-02 Thread Henrik Bengtsson
Hi, is there a (cross-platform) file-locking mechanism available in R (or via some package)? I am looking for a way to have one R session lock a file for read/write access, while being updated/modified by another R session. This will provide me with a-poor-mans parallelization method. It is ok t

Re: [Rd] R CMD build with mingw and msys (PR#9766)

2007-07-02 Thread Duncan Murdoch
On 29/06/2007 7:53 AM, [EMAIL PROTECTED] wrote: > Full_Name: Steffen > Version: 2-5-0 > OS: Windows > Submission from: (NULL) (192.124.243.162) > > > Hi, > > the R CMD build script is using > > if($WINDOWS) { > ## workaround for paths in Cygwin tar > $filepath =~ s+^([A-Za-

Re: [Rd] boxplot and bxp do not respect xlim by default (PR#9754)

2007-07-02 Thread S Ellison
Brian, > Note that ?bxp quite carefully says which graphical pars it does and does > not accept, and 'xlim' is one it does not accept. In my version at the time, bxp did not list which plot parameters it does not accept. xlim was simply not mentioned at all. I can't easily see lack of a mentio

Re: [Rd] boxplot and bxp do not respect xlim by default (PR#9754)

2007-07-02 Thread Prof Brian Ripley
On Mon, 2 Jul 2007, [EMAIL PROTECTED] wrote: > Note that ?bxp quite carefully says which graphical pars it does and does > not accept, and 'xlim' is one it does not accept. So this is a wish, not > a bug. > > The easy part is to allow it to accept 'xlim' is specified. The harder > part is to fin

Re: [Rd] saving objects with embedded environments

2007-07-02 Thread McGehee, Robert
Thanks for this. So at the risk of treading out too deep into unfamiliar water, one concern is that if I run 'lm' within a function and then the function exits, am I still (perhaps unnecessarily) keeping a copy of the function environment and the associated data? It does not seem that 'update' even

Re: [Rd] boxplot and bxp do not respect xlim by default (PR#9754)

2007-07-02 Thread ripley
Note that ?bxp quite carefully says which graphical pars it does and does not accept, and 'xlim' is one it does not accept. So this is a wish, not a bug. The easy part is to allow it to accept 'xlim' is specified. The harder part is to find a good default of xlim in general. Steve's suggesti

Re: [Rd] termplot with uniform y-limits

2007-07-02 Thread Bill.Venables
If anyone in R-devel is having trouble seeing the point of this, try this little example with the new code of Brian's: dat <- data.frame(x1=1:20, x2 = sample(1:20), y = rnorm(20)+1:20) fm <- lm(y ~ x1+x2, dat) par(mfrow = c(2,2)) termplot(fm, se = T, partial.resid = T) termplot(fm, se = T, partial

Re: [Rd] termplot with uniform y-limits

2007-07-02 Thread Prof Brian Ripley
On Mon, 2 Jul 2007, [EMAIL PROTECTED] wrote: > Precisely. Thanks Brian. > > I did do something like this but not nearly so elegantly. > > I suggest this become the standard version in the next release. I can't Yes, that was the intention (to go into R-devel). (It was also my intention to attach

Re: [Rd] termplot with uniform y-limits

2007-07-02 Thread Bill.Venables
Precisely. Thanks Brian. I did do something like this but not nearly so elegantly. I suggest this become the standard version in the next release. I can't see that it can break any existing code. It's a pity now we can't make ylim = "common" the default. Regards, Bill V. Bill Venables CSIR

Re: [Rd] termplot with uniform y-limits

2007-07-02 Thread Prof Brian D Ripley
Is the attached the sort of thing you are looking for? It allows ylim to be specified, including as "common". On Mon, 2 Jul 2007, [EMAIL PROTECTED] wrote: Does anyone have, or has anyone ever considered making, a version of 'termplot' that allows the user to specify that all plots should have t

[Rd] termplot with uniform y-limits

2007-07-02 Thread Bill.Venables
Does anyone have, or has anyone ever considered making, a version of 'termplot' that allows the user to specify that all plots should have the same y-limits? This seems a natural thing to ask for, as the plots share a y-scale. If you don't have the same y-axes you can easily misread the comparati