org.rosuda.deducer
Class Deducer

java.lang.Object
  extended by org.rosuda.deducer.Deducer

public class Deducer
extends java.lang.Object


Field Summary
static java.lang.String guiEnv
           
static boolean insideJGR
           
static boolean started
           
 
Constructor Summary
Deducer(boolean jgr)
           
 
Method Summary
static java.lang.String addSlashes(java.lang.String str)
           
 void detach()
           
static REXP eval(java.lang.String cmd)
           
static void execute(java.lang.String cmd)
           
static void execute(java.lang.String cmd, boolean hist)
           
static void executeAndContinue(java.lang.String cmd)
           
static java.util.Vector getData()
           
static RConnector getRConnector()
           
static java.lang.String getRecentData()
           
static REngine getREngine()
           
static java.lang.String getUniqueName(java.lang.String var)
          Gets a unique name based on a starting string
static java.lang.String getUniqueName(java.lang.String var, java.lang.String envName)
          Gets a unique name based on a starting string
static REXP idleEval(java.lang.String cmd)
           
static void insertJMenuItem(javax.swing.JFrame f, java.lang.String menu, java.lang.String name, java.lang.String command, java.awt.event.ActionListener al, int index)
           
static void insertMenu(javax.swing.JFrame f, java.lang.String name, int index)
           
static boolean isInstalled(java.lang.String packageName)
          is package installed
static boolean isJGR()
           
static boolean isLoaded(java.lang.String packageName)
          is package loaded
static java.lang.String makeFormula(javax.swing.DefaultListModel outcomes, javax.swing.DefaultListModel terms)
           
static java.lang.String makeRCollection(java.util.Collection lis, java.lang.String func, boolean quotes)
           
static java.lang.String makeRCollection(javax.swing.ListModel lis, java.lang.String func, boolean quotes)
           
static java.lang.String makeRCollection(java.lang.String[] lis, java.lang.String func, boolean quotes)
           
static java.lang.String makeValidVariableName(java.lang.String var)
           
static void refreshData()
           
static java.lang.String requirePackage(java.lang.String packageName)
          Checks if package is installed, and asks to install if not.
static void runCmd(java.lang.String cmd, boolean fromConsole)
           
static void runCmdThreaded(java.lang.String cmd)
           
static void setRConnector(RConnector rc)
           
static void setRecentData(java.lang.String data)
           
 void startNoJGR()
           
static void startViewerAndWait()
           
 void startWithJGR()
           
static void threadedEval(java.lang.String cmd)
           
static REXP timedEval(java.lang.String cmd)
           
static REXP timedEval(java.lang.String cmd, boolean ask)
           
static REXP timedEval(java.lang.String cmd, int interval, boolean ask)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

guiEnv

public static java.lang.String guiEnv

insideJGR

public static boolean insideJGR

started

public static boolean started
Constructor Detail

Deducer

public Deducer(boolean jgr)
Method Detail

startNoJGR

public void startNoJGR()

startWithJGR

public void startWithJGR()

isJGR

public static boolean isJGR()

detach

public void detach()

startViewerAndWait

public static void startViewerAndWait()

addSlashes

public static java.lang.String addSlashes(java.lang.String str)

runCmdThreaded

public static void runCmdThreaded(java.lang.String cmd)

runCmd

public static void runCmd(java.lang.String cmd,
                          boolean fromConsole)

insertMenu

public static void insertMenu(javax.swing.JFrame f,
                              java.lang.String name,
                              int index)

insertJMenuItem

public static void insertJMenuItem(javax.swing.JFrame f,
                                   java.lang.String menu,
                                   java.lang.String name,
                                   java.lang.String command,
                                   java.awt.event.ActionListener al,
                                   int index)

getRecentData

public static java.lang.String getRecentData()

setRecentData

public static void setRecentData(java.lang.String data)

getREngine

public static REngine getREngine()

getRConnector

public static RConnector getRConnector()

setRConnector

public static void setRConnector(RConnector rc)

eval

public static REXP eval(java.lang.String cmd)

threadedEval

public static void threadedEval(java.lang.String cmd)

timedEval

public static REXP timedEval(java.lang.String cmd)

timedEval

public static REXP timedEval(java.lang.String cmd,
                             boolean ask)

timedEval

public static REXP timedEval(java.lang.String cmd,
                             int interval,
                             boolean ask)

idleEval

public static REXP idleEval(java.lang.String cmd)

execute

public static void execute(java.lang.String cmd)

execute

public static void execute(java.lang.String cmd,
                           boolean hist)

executeAndContinue

public static void executeAndContinue(java.lang.String cmd)

makeValidVariableName

public static java.lang.String makeValidVariableName(java.lang.String var)

makeFormula

public static java.lang.String makeFormula(javax.swing.DefaultListModel outcomes,
                                           javax.swing.DefaultListModel terms)

makeRCollection

public static java.lang.String makeRCollection(java.util.Collection lis,
                                               java.lang.String func,
                                               boolean quotes)

makeRCollection

public static java.lang.String makeRCollection(javax.swing.ListModel lis,
                                               java.lang.String func,
                                               boolean quotes)

makeRCollection

public static java.lang.String makeRCollection(java.lang.String[] lis,
                                               java.lang.String func,
                                               boolean quotes)

getUniqueName

public static java.lang.String getUniqueName(java.lang.String var)
Gets a unique name based on a starting string

Parameters:
var -
Returns:
the value of var concatinated with a number

getUniqueName

public static java.lang.String getUniqueName(java.lang.String var,
                                             java.lang.String envName)
Gets a unique name based on a starting string

Parameters:
var -
envName - The name of the enviroment in which to look
Returns:
the value of var concatinated with a number

isInstalled

public static boolean isInstalled(java.lang.String packageName)
is package installed

Parameters:
packageName -
Returns:

isLoaded

public static boolean isLoaded(java.lang.String packageName)
is package loaded

Parameters:
packageName -
Returns:

requirePackage

public static java.lang.String requirePackage(java.lang.String packageName)
Checks if package is installed, and asks to install if not.

Parameters:
packageName -
Returns:
"loaded", "installed" or "not-installed"

refreshData

public static void refreshData()

getData

public static java.util.Vector getData()