[R] Using Java methods in R

hill0093 hill0093 at umn.edu
Sun Apr 24 21:22:03 CEST 2011


So I am one step farther than last time, so I am happy:
I have the RGui with R Console on the screen.
On the top pullDowns, Packages > Install Packages > USA(IA)> rJava 
> library(rJava)
> .jinit()
> .jaddClassPath("C:/ad/j")
> print(.jclassPath())
[1] "C:\\Users\\ENVY17\\Documents\\R\\win-library\\2.12\\rJava\\java"
[2] "C:\\ad\\j"                                                      
> qsLin <- .jnew("CalqsLin")
> calStg <- "201104242359599999"
> print(calStg)
[1] "201104242359599999"
> dblTim <-
> .jcall(qsLin,returnSig="D","linTimOfCalqsStgIsLev",calStg,as.integer(-4))
> print(dblTim,digits=20)
[1] 634709087999999
> calStg <-
> .jcall(qsLin,returnSig="S","calqsStgOfLinTimIsLev",dblTim,as.integer(-4))
> print(calStg)
[1] "201104242359599999"
> dblTim <-
> .jcall(qsLin,returnSig="D","linTimOfCalqsStgIsLev",calStg,as.integer(-4))
> print(dblTim,digits=20)
[1] 634709087999999
> 


--
View this message in context: http://r.789695.n4.nabble.com/Using-Java-methods-in-R-tp3469299p3471943.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list