Re: [Rd] [.data.frame speedup

2008-07-05 Thread Martin Maechler
TH == Tim Hesterberg [EMAIL PROTECTED] on Thu, 3 Jul 2008 17:04:24 -0700 writes: TH I made a couple of a changes from the previous version: TH - don't use functions anyMissing or notSorted (which aren't in base R) TH - don't check for dup.row.names attribute (need to modify

Re: [Rd] [.data.frame speedup

2008-07-03 Thread Martin Maechler
TH == Tim Hesterberg [EMAIL PROTECTED] on Tue, 1 Jul 2008 15:23:53 -0700 writes: TH There is a bug in the standard version of [.data.frame; TH it mixes up handling duplicates and NAs when subscripting rows. TH x - data.frame(x=1:3, y=2:4, row.names=c(a,b,NA)) TH y -

Re: [Rd] [.data.frame speedup

2008-07-03 Thread Tim Hesterberg
I made a couple of a changes from the previous version: - don't use functions anyMissing or notSorted (which aren't in base R) - don't check for dup.row.names attribute (need to modify other functions before that is useful) I have not tested this with a wide variety of inputs; I'm assuming

Re: [Rd] [.data.frame speedup

2008-07-01 Thread Tim Hesterberg
There is a bug in the standard version of [.data.frame; it mixes up handling duplicates and NAs when subscripting rows. x - data.frame(x=1:3, y=2:4, row.names=c(a,b,NA)) y - x[c(2:3, NA),] y It creates a data frame with duplicate rows, but won't print. In the previous message I included a

Re: [Rd] [.data.frame speedup

2008-07-01 Thread Tim Hesterberg
Here is a revised version of notSorted; change argument order (to be more like is.unsorted) and fix blunder. notSorted - function(x, na.rm = FALSE, decreasing = FALSE, strict = FALSE){ # return TRUE if x is not sorted # If decreasing=FALSE, check for sort in increasing order # If