Re: [R] Using Java methods in R

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sat, 23 Apr 2011 08:41:30 -0400

On Sat, Apr 23, 2011 at 8:32 AM, hill0093 <hill0093_at_umn.edu> wrote:
> No answer to my post,
> so let's try a simpler question. Am I doing this correctly?
> I have the RGui with R Console on the screen.
> On rhe top pullDowns, Packages > Install Packages > USA(IA)> rJava
>> library(rJava)
>> .jinit()
>> qsLin <- .jnew("C:/ad/j/CalqsLin")
> Error in .jnew("C:/ad/j/CalqsLin") :
>  java.lang.NoClassDefFoundError: C:/ad/j/CalqsLin
>
> So I got this error which means I don't understand very much.
> I go to C:/ad/j and get
> C:\ad\j>dir CalqsLin.class
>  Volume in drive C has no label.
>  Volume Serial Number is 9A35-67A2
>  Directory of C:\ad\j
> 04/23/2011  07:11 AM            14,651 CalqsLin.class
>               1 File(s)         14,651 bytes
>               0 Dir(s)  104,257,716,224 bytes free
>
> Just to show my intentions,
> I had next wanted to call this java function method:
> linTimOfCalqsStgIsLev("201104052359599999",-4) using:
>> dblTim <-
>> .jcall(qsLin,"D","linTimOfCalqsStgIsLev","201104052359599999","-4")
> but that will probably also be wrong?
> Obviously I don't understand.

Have a look at the source of other packages that use rJava. Such packages are listed at the bottom of this page: http://cran.r-project.org/web/packages/rJava/index.html

Also note that there is a separate list for R and Java: http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
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 Sat 23 Apr 2011 - 12:51:48 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 Sat 23 Apr 2011 - 13:20:33 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