From iuke-tier@ey m@iii@g oii uiow@@edu  Tue Sep  8 15:22:42 2020
From: iuke-tier@ey m@iii@g oii uiow@@edu (iuke-tier@ey m@iii@g oii uiow@@edu)
Date: Tue, 8 Sep 2020 08:22:42 -0500 (CDT)
Subject: [Rd] [External] Re:  some questions about R internal SEXP types
In-Reply-To: <CABdHhvERn9vONCfWK8gdBcvAspRj9SnBOWWWQ_1bTwfVaEet-w@mail.gmail.com>
References: <8f4d92d753e266a0c8a303b9a354a42a071b24bf.camel@kortschak.io>
 <1ec817ab612c4cf782b15f8150364ad4ff3b306b.camel-2274@kortschak.io>
 <f3f345c0-146e-9c0e-7856-9130237b3220@gmail.com>
 <CABdHhvERn9vONCfWK8gdBcvAspRj9SnBOWWWQ_1bTwfVaEet-w@mail.gmail.com>
Message-ID: <alpine.DEB.2.21.2009080818410.3141@luke-Latitude-7480>

On Tue, 8 Sep 2020, Hadley Wickham wrote:

> On Tue, Sep 8, 2020 at 4:12 AM Tomas Kalibera <tomas.kalibera at gmail.com> wrote:
>>
>>
>> The general principle is that R packages are only allowed to use what is
>> documented in the R help (? command) and in Writing R Extensions. The
>> former covers what is allowed from R code in extensions, the latter
>> mostly what is allowed from C code in extensions (with some references
>> to Fortran).
>
> Could you clarify what you mean by "documented"? For example,
> Rf_allocVector() is mentioned several times in R-exts, but I don't see
> anywhere where the inputs and output are precisely described (which is
> what I would consider to be documented). Is Rf_allocVector() part of
> the API?

For now, documented means mentioned as something extension writers can
use.  Details are in the header files, Rinternals.h for
Rf_allocVector().

Ideally someone would find the time to refactor the header files,
Rinternals.h in particular, so everything in installed headers is
considered in the API and everything else is considered private and
subject to change. Unfortunately that would take a lot of effort, both
technical and political, and I don't see it happening soon. But I'm
happy to be proved wrong.

Best,

luke

>
> Hadley
>
>

-- 
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   luke-tierney at uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu



[Rd] [External] Re: some questions about R internal SEXP types
iuke-tier@ey m@iii@g oii uiow@@edu