Search for 'where' in ?rpart.object (linked from ?rpart).
On 16/01/2014 08:50, J?r?my Lambert wrote:> Hello everyone,
>
> I just completed a recursive pratitionning analysis, using rpart, and have
a beautiful tree with 6 terminal nodes. Each terminal node containing a precise
number of patients (it's a clinical study), I'd like to create a new
variable informing in which terminal node are locating all the patients.
>
> More clearly maybe : patient 1: node 5; patient 2 : node 3; patient 3 :
node 6, etc...
>
> I thank you already for your answers
>
> Jeremy
--
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