[Rd] internal string comparison (Scollate)

Dirk Eddelbuettel edd at debian.org
Wed Mar 26 17:50:41 CET 2014

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 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. 

I'd add a third option:

   - Put this in a new package and register the functions you want.

as I don't see a R Core change on the public vs non-public APIs anytime soon.

But we have CRAN, and we can cheaply and reliably import functions from other
packages.  Yes, it is code duplication, but it offers a layer of indirection
that permits possibles changes to such an API.

I have been meaning to put such a package up for serialization code. It will
contain a few lines of C code from base R. Junji and Ei-ji have already
placed this in their Rhpc package. I am using them (in yet another copy) in
my unfinished Redis package in order to get to serialization from C++.


Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com

More information about the R-devel mailing list