A R/Java-based Statistical Learning Environment E. James Harner, Dajie Luo, and Jun Tan Department of Statistics, West Virginia University The Intelligent Distributed Environment for Adaptive Learning (IDEAL) is an online course system developed and used by the Department of Statistics at West Virginia University. IDEAL has the capabilities of a typical online course system, such as WebCT. IDEAL is an instructional database-enabled Web portal written in Java. myJavaStat is a highly interactive Java application for doing and learning statistics, and is used in conjunction with IDEAL. Currently, IDEAL is unable to provide individualized assessment of learning outcomes due to the complexity of the cognitively based models. Likewise, myJavaStat is limited to relative simple models. The solution in both cases is to use R as a backend compute engine. Both IDEAL and R access the mySQL database to minimize the direct interaction between IDEAL and R. We are developing a program called the R manager, which launches one or more R instances in batch mode. When IDEAL starts up, it opens a message channel to the R manager. When a student produces data by submitting a quiz or exam, it triggers IDEAL to check if there is enough data to update the assessment model. If there is enough data, IDEAL sends the student's user id through the message channel to the R manager. Once the R manager gets a user id, it will launch R to run the assessment model. Results of the analysis are put back into mySQL so that they are accessible to IDEAL for reporting. IDEAL, R, the R manager, and mySQL do not need to be on the same machine. Interaction between myJavaStat and R is more complex. An IDEAL-based daemon program, written in Java, accesses R through JRI. The daemon program listens through the network to get requests from myJavaStat, which is located on a client computer. The communication between myJavaStat and the daemon is purely Java-to-Java and can be implemented using RMI (Java Remote Method Invocation). The procedure is described as follows: myJavaStat sends a modeling request to the daemon. In fact, it invokes a remote modeling call provided by the daemon. The daemon generates R code in terms of the modeling request and uses JRI to link to the R dynamic library. Then the daemon sends results back to the corresponding myJavaStat program. myJavaStat uses Java to draw plots and to do further analyses based on the R results.