Re: [R] Two dependent variables in formula

From: Gavin Simpson <>
Date: Wed, 09 Jan 2008 14:54:38 +0000

On Wed, 2008-01-09 at 13:57 +0000, Carla Rebelo wrote:
> Hello,
> I' m trying to change the formula in the rpart function. The
> format of a general formula is Answer ~ expression, where Answer is
> the dependent variable and expression is set of terms containing the
> independent variables and separated by operators. I want the response
> of the formula is more than one dependent variable. It is possible?

Try one or both the packages mvpart or party. mvpart replaces all of rpart when you load it and provides handling for multivariate responses. party provides an alternative implementation based on conditional inference trees.


 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e]
 Gower Street, London          [w]
 UK. WC1E 6BT.                 [w]

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 09 Jan 2008 - 15:04:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jan 2008 - 15:30:05 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive