[R] rpart: apply tree to new data to get "counts"

Weidong Gu anopheles123 at gmail.com
Mon Aug 29 20:40:43 CEST 2011


? predict.rpart

Weidong Gu

On Mon, Aug 29, 2011 at 12:49 PM, Jay <josip.2000 at gmail.com> wrote:
> Hi,
>
> when I have made a decision tree with rpart, is it possible to "apply"
> this tree to a new set of data in order to find out the distribution
> of observations? Ideally I would like to plot my original tree, with
> the counts (at each node) of the new data.
>
>
> Reagards,
> Jay
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list