[R] use classificators learned in R in

Dieter Menne dieter.menne at menne-biomed.de
Mon Feb 4 11:00:36 CET 2008


 <sich <at> gmx.de> writes:

> I am interested in using R for machine learning (supervised classification).
> Currently, I have been investigating especially the rpart, tree, and
randomForest package, and have
> achieved first results.
> 
> are there any experiences, how the learned classificators could
> be used in e.g. C ?
> in other words, I want to "transfer" the learned predictor from R
> to C-code.

You could use dput to write the representation to a file, and read it from 
C. Parsing could be nasty, though, so I would prefer to extract the 
relevant information (e.g. fit$cptable and fit$splits in the rpart example), 
and write it to a database in numeric form with additional information if 
required. Another option could be XML (package XML), and using one of the 
many XML libraries in C(++).

Dieter



More information about the R-help mailing list