-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRGraphicsDevice.java
More file actions
40 lines (30 loc) · 929 Bytes
/
RGraphicsDevice.java
File metadata and controls
40 lines (30 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import java.awt.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import javax.swing.*;
import org.rosuda.REngine.*;
import org.rosuda.javaGD.GDInterface;
import org.rosuda.javaGD.JGDBufferedPanel;
/**
* Write a description of class RGraphicsDevice here.
*
* @author (Omar)
* @version (6/4/14)
*/
public class RGraphicsDevice extends GDInterface
{
JGDBufferedPanel panel;
public RGraphicsDevice(int x,int y) {
panel = new JGDBufferedPanel(x,y);
}
public static void main(String[] args) {
try{REngine R = REngine.engineForClass("org.rosuda.REngine.JRI.JRIEngine");
//R.parseAndEval("library(JavaGD);JavaGD() ; hist(rnorm(100),col=\"lightblue\");");
String x = R.parseAndEval("print('Hello A');x= scan(file.choose());").asString();
System.out.println(x);
R.close();}
catch(Exception e){
//asd
}
}
}