Getting ready

If you have not already downloaded the files for this chapter, do it now and ensure that these files are in your R working directory:

  1. Create a folder called javasamples, and move all the files with extension .java or .class into this folder under your working directory.
  2. Install rJava using the install.packages("rJava") command.
  3. Load the package using the library(rJava) command.
  4. For rJava to work in your environment, the JDK version should be identical for the following, and we explain how to get them in sync for Mac OS X:
    • The environment JDK version: Execute java -version in your command line to get the installed version of Java. You will be using this version to create the .jar files or to compile Java programs.
    • The JDK ...

Get R Data Analysis Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.