[R] Help in Compliling user -defined functions in Rpart

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Aug 26 19:44:01 CEST 2005


On Fri, 26 Aug 2005, Luwis Tapiwa Diya wrote:

> I have been trying to write my own user defined function in Rpart.I
> imitated the anova splitting rule which is given as an example.In the
> work I am doing ,I am calculating the concentration index(ci) ,which
> is in between -1 and +1.So my deviance is given by
> abs(ci)*(1-abs(ci)).Now when I run rpart incorporating this user
> defined function i get the following error message:
>
> Error in user.split(yback[1:nback], wback[1:nback], xback[1:nback], parms,  :
>        unused argument(s) ( ...)
>
> Now I am failing to indentify where I am going wrong (In case I am
> have made some mistake).So I was wondering if there is anybody who
> have written some user defined functions of theirs and maybe if there
> is any documentation with regards to user defined functions and
> examples.

There is a commented example in the tests directory (of the sources).

-- 
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 mailing list