rJava

1,492 views
1,299 views

Published on

2013-6-24 Taiwan-useR-Group
報名網址:http://www.meetup.com/Taiwan-R/events/121977422/
FB粉絲團:https://www.facebook.com/Tw.R.User

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,492
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
29
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

rJava

  1. 1. rJavaPhilipz
  2. 2. rJavaA simple R-to-Java interface.From R to invoke Java Object,instance, and method, then get thevalue.http://www.rforge.net/rJava/
  3. 3. How Uselibrary(rJava) and .jinit()Classpi <- J("java.lang.Math")Instances <- .jnew("java/lang/String", "Hello World!")Find Field.jfield("java/lang/Boolean",, "TYPE")Methodpi$ + TAB or names(pi) or .jmethods(pi).jcall(s,"I","length") or s$length()
  4. 4. Return Type
  5. 5. Demo1. HelloJavaWorld2. GUI - SWT3. Send Email from R throughJava4. Capital APIDesign Pattern - singleton
  6. 6. Sorry
  7. 7. JRIJRI is part of rJava.From Java to invoke R library, Rfunction, and R interactive console.http://www.rforge.net/JRI/
  8. 8. How UseImport Jar librarieshttp://www.rforge.net/JRI/files/Set Path variableSys.getenv("Path") orJava Run Environment VariablesR_HOME/R-3.0.0/bin/i386;R_HOMER-3.0.0libraryrJavajrii386R_HOME/R-3.0.0/bin/x64;R_HOMER-3.0.0libraryrJavajrix64
  9. 9. Demo1. R console2. AWT GUI3. High-level interactiveJRIEngine4. Low-level interactiveRengine
  10. 10. ReferencerJavarJava DocsSwing Example - Building a GUI from RCreating R Packages: A TutorialJava JNIJRIJRI Javadoc
  11. 11. Thank you

×