Re: [Rd] POSIXlt matching bug

2010-07-02 Thread Sklyar, Oleg (London)
POSIXlt is a list and it is not a list of dates or times, it is a list of x - as.POSIXlt(Sys.Date()) names(x) [1] sec min hour mday mon year wday yday isdst So if you want to match these things, you should use POSIXct or any other numeric-based format (as POSIXct is just a double

Re: [Rd] POSIXlt matching bug

2010-07-02 Thread Martin Maechler
RobMcG == McGehee, Robert robert.mcge...@geodecapital.com on Tue, 29 Jun 2010 10:46:06 -0400 writes: RobMcG I came across the below mis-feature/bug using match with POSIXlt objects RobMcG (from strptime) in R 2.11.1 (though this appears to be an old issue). x -

Re: [Rd] POSIXlt matching bug

2010-07-02 Thread Martin Maechler
MM == Martin Maechler maech...@stat.math.ethz.ch on Fri, 2 Jul 2010 12:22:07 +0200 writes: RobMcG == McGehee, Robert robert.mcge...@geodecapital.com on Tue, 29 Jun 2010 10:46:06 -0400 writes: RobMcG I came across the below mis-feature/bug using match with POSIXlt objects

[Rd] Best way to determine if you're running 32 or 64 bit R on windows

2010-07-02 Thread Jeffrey Horner
Hi, Is this sufficient? if (.Machine$sizeof.pointer==4){ cat('32\n') } else { cat('64\n') } Or is it better to test something in R.version, say os? I'd like to use this to specify appropriate linker arguments when building the RMySQL windows package. Jeff --

Re: [Rd] Best way to determine if you're running 32 or 64 bit R on windows

2010-07-02 Thread Martin Maechler
Jeffrey Horner jeffrey.horner at gmail.com writes: Is this sufficient? if (.Machine$sizeof.pointer==4){ cat('32\n') } else { cat('64\n') } Or is it better to test something in R.version, say os? No, the above is perfect, as it also works on other platforms to distinguish 32-bit

[Rd] Attributes of 1st argument in ...

2010-07-02 Thread Daniel Murphy
R-Devel: I am trying to get an attribute of the first argument in a call to a function whose formal arguments consist of dots only and do something, e.g., call 'cbind', based on the attribute f- function(...) {get first attribute; maybe or maybe not call 'cbind'} I thought of (ignoring

Re: [Rd] Attributes of 1st argument in ...

2010-07-02 Thread Olaf Mersmann
Hi Daniel, On 02.07.2010, at 23:26, Daniel Murphy wrote: I am trying to get an attribute of the first argument in a call to a function whose formal arguments consist of dots only and do something, e.g., call 'cbind', based on the attribute f- function(...) {get first attribute; maybe or maybe

[Rd] kmeans

2010-07-02 Thread Gabor Grothendieck
In kmeans() in stats one gets an error message with the default clustering algorithm if centers = 1. Its often useful to calculate the sum of squares for 1 cluster, 2 clusters, etc. and this error complicates things since one has to treat 1 cluster as a special case. A second reason is that