Andreas Weingessel
Tue, 20 Jan 1998 16:17:00 +0100

>>>>> On 20 Jan 1998 09:02:56 -0600,
>>>>> Douglas Bates wrote:

> Andreas Weingessel <> writes:
>> When I tried to port the statlib-Pkg rpart to R, I came across the
>> c-Function prlab which seems to be part of S+, but not of R.
>> Does anyone know what prlab does and how difficult it would be to
>> emulate it in R?

> Can you show us the context?  If I had to guess I would say it was a
> routine to print labels but that's just a guess.

That seems right, the function is called labels.rpart and seems to be
similar to the S-Fct labels.tree.

The call itself is

        pn <- .C("prlab",
                lab = character(2 * length(var)),
                as.character(splits[, 1]),
                as.character(splits[, 2]),
                as.integer(var2),             #with 0 denoting a leaf

where (for the data I tried) var is a vector of factor objects, splits
is an nx2 matrix of strings, xlevels is NULL, var2 and temp are
numeric vectors.

Of course I can send the whole code, if someone is interested.

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: