From edd at debian.org  Wed Mar 26 17:50:41 2014
From: edd at debian.org (Dirk Eddelbuettel)
Date: Wed, 26 Mar 2014 11:50:41 -0500
Subject: [Rd] internal string comparison (Scollate)
In-Reply-To: <D3531066-EF05-4C8D-8B83-581C7F042D0D@r-enthusiasts.com>
References: <D3531066-EF05-4C8D-8B83-581C7F042D0D@r-enthusiasts.com>
Message-ID: <21299.1377.790733.398726@max.nulle.part>


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

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



[Rd] internal string comparison (Scollate)
Dirk Eddelbuettel