Re: [Rd] Linking to the BH package introduces CRAN warnings

2014-11-05 Thread Romain François
> Le 5 nov. 2014 à 14:45, Dirk Eddelbuettel a écrit : > > > On 5 November 2014 at 14:11, Romain Francois wrote: > | > Le 5 nov. 2014 à 13:43, Dirk Eddelbuettel a écrit : > | > You are NOT forced or required to use the Boost distributions header __as > R > | > comes with the equivalent functio

Re: [Rd] Linking to the BH package introduces CRAN warnings

2014-11-04 Thread Romain François
xception.hpp#L215 <https://github.com/eddelbuettel/bh/blob/cb1427c27dc068c8328fd1d2f4b1b8a8da1957c2/inst/include/boost/numeric/ublas/exception.hpp#L215> But I don’t think this is of any relevance to the files you want to use. Romain > On 2014-11-04 21:46, Romain François wrote: >&g

Re: [Rd] Linking to the BH package introduces CRAN warnings

2014-11-04 Thread Romain François
> Le 4 nov. 2014 à 15:42, Dirk Eddelbuettel a écrit : > > > On 4 November 2014 at 14:37, kaveh wrote: > | Dear all, > | > | I'm working on a project that links to the BH package > | (http://cran.r-project.org/web/packages/BH/index.html). > | > | My packages doesn't call entry points which mig

Re: [Rd] Using Rtools with gcc 4.8.3

2014-10-05 Thread Romain François
Le 5 oct. 2014 à 13:56, Romain François a écrit : > > Le 5 oct. 2014 à 13:14, Gabor Grothendieck a écrit : > >> On Sun, Oct 5, 2014 at 6:51 AM, Uwe Ligges >> wrote: >>> >>> >>> On 05.10.2014 12:20, Jeroen Ooms wrote: >>>> >

Re: [Rd] Using Rtools with gcc 4.8.3

2014-10-05 Thread Romain François
Le 5 oct. 2014 à 13:14, Gabor Grothendieck a écrit : > On Sun, Oct 5, 2014 at 6:51 AM, Uwe Ligges > wrote: >> >> >> On 05.10.2014 12:20, Jeroen Ooms wrote: >>> >>> I started working on some R bindings for mongo-c-driver [1]. The C >>> library compiles fine on Ubuntu Trusty (gcc 4.8.2) and os

Re: [Rd] using C code to create data frame but always return as list

2014-06-24 Thread Romain François
Le 24 juin 2014 à 14:58, Simon Urbanek a écrit : > On Jun 24, 2014, at 9:21 AM, Romain Francois wrote: > >> Hi, >> >> Can you give us what str on the returned object gives you? >> >> I think you need : >> >> SET_OBJECT(and, 1) ; >> >> at the end. >> > > SET_OBJECT should not be used

Re: [Rd] operation on ‘numsels’ may be undefined

2014-06-23 Thread Romain François
ic compilers, all of them have value . Romain > On 6/23/14 3:45 PM, Romain François wrote: >> >> Le 23 juin 2014 à 15:20, cstrato a écrit : >> >>> Dear all, >>> >>> Since many years the following C++ code does compile on ALL Bioconductor >&g

Re: [Rd] operation on ‘numsels’ may be undefined

2014-06-23 Thread Romain François
Le 23 juin 2014 à 15:20, cstrato a écrit : > Dear all, > > Since many years the following C++ code does compile on ALL Bioconductor > servers (Linux, Windows, Mac) without any warnings: > > Int_t numsels = 0; //number of selected entries > ... > for (Int_t i=0; i numsels = (arrMas

Re: [Rd] R 3.1.0 and C++11

2014-04-10 Thread Romain François
Le 10 avr. 2014 à 17:58, Martyn Plummer a écrit : > On Thu, 2014-04-10 at 11:14 -0400, Gabor Grothendieck wrote: >> On Tue, Oct 29, 2013 at 1:58 AM, wrote: >>> Le 2013-10-29 03:01, Whit Armstrong a écrit : >>> I would love to see optional c++0x support added for R. >>> >>> >>> c++0x wa

Re: [Rd] question regarding lang2 command in C

2014-04-02 Thread Romain François
Hi, This is easy if the gender and age are already vectors of some sort of the same size. SEXP df = PROTECT(allocVector(VECSXP, 2)); SET_VECTOR_ELT(df,0,gender) ; SET_VECTOR_ELT(df,1,age) ; SEXP names = PROTECT(allocVector(STRSXP,2)); SET_STRING_ELT(names,0,mkChar("age")) SET_STRING_ELT(names

[Rd] special handling of row.names

2014-04-01 Thread Romain François
Hello, I think there is an inconsistency in the handling of the compact form of the row.names attributes. When n is the number of rows of a data.frame, the compact form is c(NA_integer_,-n), as in: > d <- data.frame(x=1:10) > .Internal(inspect(d)) @104f174a8 19 VECSXP g0c1 [OBJ,NAM(2),ATT]

Re: [Rd] internal string comparison (Scollate)

2014-03-31 Thread Romain François
API imposes additional maintenance burdens >> on an already thinly stretched team, but this is a situation where the >> R users and package authors alike could benefit. Or, if there are >> other reasons why exporting such routines is not possible nor >> recommended, it would be very

Re: [Rd] CXX_STD and configure.ac in packages

2014-03-31 Thread Romain François
Le 31 mars 2014 à 12:20, Martyn Plummer a écrit : > On Mon, 2014-03-31 at 07:09 +, Martyn Plummer wrote: >> Hi Martin, >> >> Thanks for the patch. I have applied it. I also added CXX1X and friends to >> the list of approved variables for R CMD config. >> So you can now query the existence o

Re: [Rd] internal string comparison (Scollate)

2014-03-26 Thread Romain François
Le 26 mars 2014 à 18:03, Gabriel Becker a écrit : > On Wed, Mar 26, 2014 at 9:50 AM, Dirk Eddelbuettel wrote: > > On 26 March 2014 at 17:22, Romain François wrote: > | I’d like to compare two strings internally the way R would, so I need > Scollate which is not part of the a

[Rd] internal string comparison (Scollate)

2014-03-26 Thread Romain François
Hello, I’d like to compare two strings internally the way R would, so I need Scollate which is not part of the authorized R api. So: - Can Scollate (and perhaps Seql) be promoted to api ? - If not what are the alternatives ? Using strcmp or stroll does not seem as general as Scollate. Ro

Re: [Rd] help with gotoExitingHandler(R_NilValue, call, entry); . Implementation of error handling internally

2014-02-27 Thread Romain François
. 2014 à 08:13, Romain François a écrit : > Of course one problem is that R hides things that I need for this, such as > R_HandlerStack and R_ReturnedValue. > > I understand they have to be hidden, in which case can we have an exposed > mechanism similar to what R_ToplevelExec doe

Re: [Rd] help with gotoExitingHandler(R_NilValue, call, entry); . Implementation of error handling internally

2014-02-26 Thread Romain François
. 2014 à 09:41, Romain François a écrit : > Hello, > > I’m trying to leverage R_ToplevelExec to implement C level try/catch. > > The way it is implemented allows for running a function in a top level > context. This context gets an empty handler stack, so either the function

[Rd] help with gotoExitingHandler(R_NilValue, call, entry); . Implementation of error handling internally

2014-02-26 Thread Romain François
Hello, I’m trying to leverage R_ToplevelExec to implement C level try/catch. The way it is implemented allows for running a function in a top level context. This context gets an empty handler stack, so either the function runs correctly or it jumps. When it jumps, it does not find a handler,

Re: [Rd] Linking to native routines in other packages

2014-01-22 Thread Romain François
Hello, The problem is that you have logic in both your mother and child packages. IMO, you should only have logic in the mother package. I’ve done this in a number of packages, it requires a bit of work initially, but not that much. What I’d do is have something like this in mother/inst/inc

Re: [Rd] External pointers and changing SEXPTYPE

2013-12-16 Thread Romain François
Hi, One solution to protect an object from the GC is to use the R_PreserveObject and R_ReleaseObject functions. This way, you are not subject to the stack that PROTECT, UNPROTECT, UNPROTECT_PTR uses. Using R_PreserveObject and R_ReleaseObject is one of the best things that has ever happene

Re: [Rd] internal manipulation of ...

2013-12-14 Thread Romain François
my_fun", environment()) > } > > I think (and may well be wrong) that you can use standard tools to > find the DOTSXP object in that environment. > > Hadley > > > On Thu, Dec 12, 2013 at 2:32 PM, Romain François > wrote: >> Hello, >> >> I’m looking for

Re: [Rd] internal manipulation of ...

2013-12-12 Thread Romain François
Le 13 déc. 2013 à 00:15, Simon Urbanek a écrit : > > On Dec 12, 2013, at 3:32 PM, Romain François wrote: > >> Hello, >> >> I’m looking for examples on how to manipulate the ... internally, e.g. in a >> .Call or .External function. >> >>

[Rd] internal manipulation of ...

2013-12-12 Thread Romain François
Hello, I’m looking for examples on how to manipulate the ... internally, e.g. in a .Call or .External function. I’m particularly interested in accessing the environment in which each contribution to ... can be evaluated. So far, I’m using tricks involving passing down the sys.calls() and s

[Rd] extending the colClasses argument in read.table

2011-11-21 Thread Romain François
Hello, We've released the int64 package to CRAN a few days ago. The package provides S4 classes "int64" and "uint64" that represent signed and unsigned 64 bit integer vectors. One further development of the package is to facilitate reading 64 bit integer data from csv, etc ... files. I hav