Re: [Rd] grep with fixed=TRUE and ignore.case=TRUE

2007-05-17 Thread Petr Savicky
> strncasecmp is not standard C (not even C99), but R does have a substitute > for it. Unfortunately strncasecmp is not usable with multibyte charsets: > Linux systems have wcsncasecmp but that is not portable. In these days of > widespread use of UTF-8 that is a blocking issue, I am afraid.

Re: [Rd] grep with fixed=TRUE and ignore.case=TRUE

2007-05-17 Thread Prof Brian Ripley
On Thu, 17 May 2007, Petr Savicky wrote: >> strncasecmp is not standard C (not even C99), but R does have a substitute >> for it. Unfortunately strncasecmp is not usable with multibyte charsets: >> Linux systems have wcsncasecmp but that is not portable. In these days of >> widespread use of UTF

[Rd] RFC: adding an 'exact' argument to [[

2007-05-17 Thread Seth Falcon
Hi all, One of the things I find most problematic in R is the partial matching of names in lists. Robert and I have discussed this and we believe that having a mechanism that does not do partial matching would be of significant benefit to R programmers. To that end, I have written a patch that m

[Rd] model.matrix bug? Nested factor yields singular design matrix.

2007-05-17 Thread Steven McKinney
Hi all, I believe this is a bug in the model.matrix function. I'd like a second opinion before filing a bug report. If I have a nested covariate B with multiple values for just one level of A, I can not get a non-singular design matrix out of model.matrix > df <- data.frame(A = factor(c("a", "a

Re: [Rd] model.matrix bug? Nested factor yields singular design matrix.

2007-05-17 Thread Steven McKinney
Apologies - I forgot the session info. > sessionInfo() R version 2.5.0 (2007-04-23) powerpc-apple-darwin8.9.1 locale: en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base"

Re: [Rd] RFC: adding an 'exact' argument to [[

2007-05-17 Thread Bill Dunlap
On Thu, 17 May 2007, Seth Falcon wrote: > One of the things I find most problematic in R is the partial matching > of names in lists. Robert and I have discussed this and we believe > that having a mechanism that does not do partial matching would be of > significant benefit to R programmers. To

Re: [Rd] RFC: adding an 'exact' argument to [[

2007-05-17 Thread Seth Falcon
Bill Dunlap <[EMAIL PROTECTED]> writes: > This sounds interesting. Do you intend to leave the $ > operator alone, so it will continue to do partial > matching? I suspect that that is where the majority > of partial matching for list names is done. The current proposal will not touch $. I agree

Re: [Rd] RFC: adding an 'exact' argument to [[

2007-05-17 Thread Prof Brian Ripley
On Thu, 17 May 2007, Seth Falcon wrote: > Bill Dunlap <[EMAIL PROTECTED]> writes: >> This sounds interesting. Do you intend to leave the $ >> operator alone, so it will continue to do partial >> matching? I suspect that that is where the majority >> of partial matching for list names is done. >

Re: [Rd] RFC: adding an 'exact' argument to [[

2007-05-17 Thread Duncan Murdoch
On 5/17/2007 3:54 PM, Prof Brian Ripley wrote: > On Thu, 17 May 2007, Seth Falcon wrote: > >> Bill Dunlap <[EMAIL PROTECTED]> writes: >>> This sounds interesting. Do you intend to leave the $ >>> operator alone, so it will continue to do partial >>> matching? I suspect that that is where the maj

Re: [Rd] Unexpected alteration of data frame column names

2007-05-17 Thread hpages
Hi, Thanks to both for your answers! Quoting Marc Schwartz <[EMAIL PROTECTED]>: > On Thu, 2007-05-17 at 10:54 +0100, Prof Brian Ripley wrote: > > To add to Marc's detective work. ?"[.data.frame" does say > > > > If '[' returns a data frame it will have unique (and non-missing) > > r