[Rd] shash in unique.c

2010-02-22 Thread Matthew Dowle
Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? shash would look like a

Re: [Rd] Where does install.R go when R gets compiled? Or, how to experiment with changes to install.R?

2010-02-22 Thread Uwe Ligges
On 20.02.2010 00:04, Paul Johnson wrote: On Thu, Feb 18, 2010 at 2:20 PM, Jens Elknerje...@cs.uni-magdeburg.de wrote: On Thu, Feb 18, 2010 at 11:33:14AM -0600, Paul Johnson wrote: I'm pursuing an experiment to make RPM files for R packages on-the-fly. Any time I install an R package

[Rd] Compiling R on Linux with SunStudio 12.1: wide-character type problems

2010-02-22 Thread rt
I am trying to compile R on Linux using SunStudio. Configure flags are mostly as suggested in the R install guide. CC=/opt/sun/sunstudio12.1/bin/suncc CFLAGS=-g -xc99 -xlibmil -xlibmieee MAIN_CFLAGS=-g SHLIB_CFLAGS=-g CPPFLAGS=-I. -I/opt/sun/sunstudio12.1/prod/include

[Rd] grid unit bug? (PR#14220)

2010-02-22 Thread gunter . berton
The following seems to me to be at least a perverse trap, if not an = outright bug: is.numeric(unit(1,npc)) [1] TRUE is.numeric(1*unit(1,npc)) [1] FALSE is.numeric(unit(0,npc) +unit(1,npc)) [1] FALSE ...etc. i.e. is.numeric() appears to be TRUE for class unit but false for = class

[Rd] patch about compile R with clang

2010-02-22 Thread Gong Yu
clang is compiler http://clang.llvm.org, it is fast and better c compiler then gcc, yesterday i use clang and gfortran compile R. The only two change in source code is : 1. the configure file (in confiure when test include wctype.h,gcc can compile but clang need include both wchar.h

[Rd] Best style to organize code, namespaces

2010-02-22 Thread Ben
Hi all, I'm hoping someone could tell me what best practices are as far as keeping programs organized in R. In most languages, I like to keep things organized by writing small functions. So, suppose I want to write a function that would require helper functions or would just be too big to write

Re: [Rd] Best style to organize code, namespaces

2010-02-22 Thread Duncan Murdoch
On 22/02/2010 9:49 PM, Ben wrote: Hi all, I'm hoping someone could tell me what best practices are as far as keeping programs organized in R. In most languages, I like to keep things organized by writing small functions. So, suppose I want to write a function that would require helper

Re: [Rd] Best style to organize code, namespaces

2010-02-22 Thread Gabor Grothendieck
As you mention ease of debugging basically precludes subfunctions so style 1 is left. Functions can be nested in environments rather than in other functions and this will allow debugging to still occur. The proto package which makes it particularly convenient to nest functions in environments

Re: [Rd] Best style to organize code, namespaces

2010-02-22 Thread Mark.Bravington
Ben-- FWIW my general take on this is: - Namespaces solve the collision issue. - Style 2 tends to make for unreadably long code inside Foo, unless the subfunctions are really short. - Style 3 is too hard to work with - So I usually use a variant on style 1: ### Style 4

Re: [Rd] patch about compile R with clang

2010-02-22 Thread Prof Brian Ripley
configure is a generated file, and so should not be edited directly. You have not told us what version of R these patches were against, but it looks to me as if wchar.h is included already in current R (R-patched/R-devel) -- certainly in the second case before wctype.h. (It really should not be