[R] Usage of rJava (.jcall) with Weka functions, any example?

From: Josep Maria Campanera Alsina <campaxic_at_gmail.com>
Date: Wed, 02 Jul 2008 16:28:54 +0200

Dear All,

I'd like to use Weka functions that are not implemented (do not have interface) in RWeka, like the Remove function and others in the future!

The .java() functionality is for that purpose but I haven't seen any example with Weka functions. Could anyone give me hand in how to do it? For instace if I want to use the

  1. in the R console, first I load a matrix file,

> matrix <- read.table(fileName, header=TRUE)

2. Second, I f I want to remove the first attribute with Weka:

> library(grid)
> library(rJava)
> library(RWeka)
> c <- .jcall("weka/filters/unsupervised/attribute/Remove","S","Remove","-R","1",matrix)

Is it that right?

I get this message error!

method Remove with signature
(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; not found

I've played around but I cannot get through!

All help will be appreciated! Thank you very much!

Josep Maria,

>>>>>> Josep Maria Campanera Alsina writes:
>> Dear Kurt Hornik,
>> I'm interested in Rweka. I've downloaded the manual for version
>> 0.3-10. I'd like to know if all functionalities of Weka 3.5.7 are
>> integrated in Rweka. For instance I cannot see any reference to the
>> Database loader in the Rweka manual although it is a functionality of
>> weka.
> RWeka comes with all of Weka, but not all of Weka has high-level R
> interfaces. You can still use these parts using the low-level .jcall()
> mechanisms provided by the rJava layer.

> Best
> -k
>> Thanks a lot,
>> Josep Maria,

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 Wed 02 Jul 2008 - 20:30:43 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 Thu 03 Jul 2008 - 14:31:02 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