[R] Subgroups definition with rpart
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jan 16 10:13:37 CET 2014
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
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
More information about the R-help