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

Dumblauskas, Jerry jerry.dumblauskas at credit-suisse.com
Thu Jul 3 16:18:05 CEST 2008

I don't know what Rweka is, but to see what is available in a java class


It will give a list of methods you can call.

Since you didn't make a "New" instance of this class, you only have
access to static methods -- I downloaded this and did a quick look and
did not see any static method that matched yours below.


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Josep Maria Campanera Alsina
Sent: Wednesday, July 02, 2008 9:29 AM
To: r-help at r-project.org
Subject: [R] Usage of rJava (.jcall) with Weka functions, any example?

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
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
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

Please access the attached hyperlink for an important electronic communications disclaimer: 


More information about the R-help mailing list