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

2010-07-02 Thread Prof Brian Ripley
On Fri, 2 Jul 2010, Jeffrey Horner wrote: Hi, Is this sufficient? Yes, if you want to know in R code. if (.Machine$sizeof.pointer==4){ cat('32\n') } else { cat('64\n') } Or is it better to test something in R.version, say os? Not 'os' (the OS is the same), but 'arch' changes. Just as

[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 easil

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 m

[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 "deparse.

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 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 and 64-bi

[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 -- http://biostat.mc.vanderbilt.e

Re: [Rd] Problem with dyn.load() under Windows 64bit at CRAN

2010-07-02 Thread Dominick Samperi
2010/7/2 Uwe Ligges > Really, given my lack of time and your annoying posts to the lists > containing misleading information, I probably should stop to care about your > package at all. There are > 2000 other packages and some more important > tasks to tackle. Consider the CRAN team would take so

Re: [Rd] Problem with dyn.load() under Windows 64bit at CRAN

2010-07-02 Thread Uwe Ligges
On 02.07.2010 16:10, Dominick Samperi wrote: 2010/6/30 Uwe Ligges On 30.06.2010 15:44, Dominick Samperi wrote: Another odd thing about this is that everything worked under Windows 64bit before the changes were made to serialize the build of packages that depend on each other. That's untru

Re: [Rd] POSIXlt matching bug

2010-07-02 Thread Martin Maechler
> "MM" == Martin Maechler > on Fri, 2 Jul 2010 12:22:07 +0200 writes: > "RobMcG" == McGehee, Robert > 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

Re: [Rd] Problem with dyn.load() under Windows 64bit at CRAN

2010-07-02 Thread Dominick Samperi
2010/6/30 Uwe Ligges > On 30.06.2010 15:44, Dominick Samperi wrote: > > Another odd thing about this is that everything worked under Windows 64bit >> before the changes were made to serialize the build of packages that >> depend on each other. >> > That's untrue. I try to serialize some things o

Re: [Rd] POSIXlt matching bug

2010-07-02 Thread Martin Maechler
> "RobMcG" == McGehee, Robert > 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 <- as.POSIXlt(Sys.Date()) >

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