Re: [Rd] Getting the name of a SEXP type in package code?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 08 Nov 2006 - 07:05:06 GMT

type2char is itself a fairly recent addition (there is also type2str, which is older) that I found useful for improving messages in R itself.

I have not encountered such a need in package code, but the function is exported.

This is not a request to move type2char from Defn.h to Rinternals.h, and I don't understand why not: what else is needed?

On Tue, 7 Nov 2006, Martin Maechler wrote:

>>>>>> "Seth" == Seth Falcon <sfalcon@fhcrc.org>
>>>>>> on Tue, 07 Nov 2006 06:55:06 -0800 writes:
>
> Seth> Hi,
> Seth> Is there an alternative to type2char that is available for use in
> Seth> package code? It would be useful for producing more informative error
> Seth> messages.
>
> I haven't looked closely, but I vaguely remember that I had
> thought in the past,
> (a version of) type2char() should be made part of R's API.
> Exactly because of the reason you give.
>
> A more sensible name for the exported function would probably be
> R_type2char or
> Rtype_to_char or
> Rtype_as_char

It is exported as Rf_type2char.

> If you are going to provide a patch (against R-devel),
> you'd ideally also include the corresponding entry in
> doc/manual/R-exts.texi ... (:-)
>
> Martin
>
> PS: I will be mostly absent from e-mail for the rest of the week.
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Nov 08 22:02:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 09 Nov 2006 - 20:30:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.