Message-ID: <Pine.LNX.4.44.0304141725570.13788-100000@gannet.stats>
Date: 2003-04-14T16:30:50Z
From: Brian Ripley
Subject: categorical variables
In-Reply-To: <1050334272.3e9ad4409d1c4@webmail.sapo.pt>
On Mon, 14 Apr 2003, Luis Silva wrote:
> I want to fit an rpart model (regression tree). I transformed
> those variables to factors already and it worked. The problem
> is that when I plot the tree the categorical variables came
> like Emissor=acde, that I suppose it is a code for the numbers
> 1,3,4,5. I think I can force R to plot Emissor=1345 or
> something like that
?text.rpart says
pretty: an integer denoting the extent to which factor levels in
split labels will be abbreviated. A value of (0) signifies
no abbreviation. A `NULL', the default, signifies using
elements of letters to represent the different factor levels.
so the answer is right there on the help page.
--
Brian D. Ripley, ripley at 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