Re: [R] use classificators learned in R in

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Mon, 4 Feb 2008 10:00:36 +0000 (UTC)

 <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



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. Received on Mon 04 Feb 2008 - 10:06:09 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 Mon 04 Feb 2008 - 10:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive