From Andreas.Weingessel@ci.tuwien.ac.at  Tue Jan 20 15:17:00 1998
From: Andreas.Weingessel@ci.tuwien.ac.at (Andreas Weingessel)
Date: Tue, 20 Jan 1998 16:17:00 +0100
Subject: prlab
In-Reply-To: <6rd8hn9oin.fsf@franz.stat.wisc.edu>
References: <199801200942.KAA16633@elendil.ci.tuwien.ac.at>
 <6rd8hn9oin.fsf@franz.stat.wisc.edu>
Message-ID: <199801201517.QAA17174@elendil.ci.tuwien.ac.at>

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

> Andreas Weingessel <Andreas.Weingessel@ci.tuwien.ac.at> 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.character(unlist(xlevels)),
                as.integer(var2),             #with 0 denoting a leaf
                as.integer(temp),
                as.integer(length(var2)))

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.

	Andreas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


prlab
Andreas Weingessel