[Rd] Memory leak

2006-10-19 Thread Brahm, David
This is a followup to the R-help thread, "Error: STRING_ELT() can only be applied to a 'character vector', not a 'builtin'". Thanks to Prof. Brian Ripley for suggesting the use of gctorture and valgrind. I am getting segmentation faults that appear to come from a memory leak. I now have a reprod

Re: [Rd] Strict seq: a recommendation

2006-08-23 Thread Brahm, David
I use: for (m in beg %:% end) {...} where "%:%" <- function(a, b) if (b >= a) a:b -- David Brahm ([EMAIL PROTECTED]) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dominick Samperi Sent: Wednesday, August 23, 2006 11:13 AM To: r-devel@r-project.or

Re: [Rd] sort changes datatype of operand (PR#9121)

2006-08-17 Thread Brahm, David
On 8/3/2006 10:34 AM, <[EMAIL PROTECTED]> noted that, starting with R-2.3.0, sort() fails to preserve date classes: > dates <- seq(Sys.Date(), len=5, by="1 day") > dates[order(dates)] > [1] "2006-08-03" "2006-08-04" "2006-08-05" "2006-08-06" "2006-08-07" > sort(dates) > [1] 13363 13364 13365 13366

Re: [Rd] Dropping unused levels of a factor that has "NA" as a level

2006-07-11 Thread Brahm, David
I mentioned this in R-help on April 28: | as.character.factor contains this line (where cx=levels(x)[x]): | if ("NA" %in% levels(x)) cx[is.na(x)] <- "" | | Is it possible that this is no longer the desired behavior? These | two resu

Re: [Rd] Multiplication (PR#8466)

2006-01-06 Thread Brahm, David
While we're swapping precedence tales, can you guess what this gives: > q <- TRUE > 2 + !q + 3 It's "2", not "5". Bit me in the arse just the other day :-) -- David Brahm ([EMAIL PROTECTED]) __ R-devel@r-project.org mailing list https://stat.ethz.ch/