|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.j2r.REngineAbstract
public abstract class REngineAbstract
Abstract REngine that provides utility R methods (such as clear session, set working directory, import data, ...) for all R engines.
| Field Summary | |
|---|---|
protected Boolean |
autocommit
If true, commit each R instruction on the fly, if false, commit only when the commit() method is called. |
| Constructor Summary | |
|---|---|
REngineAbstract()
|
|
| Method Summary | |
|---|---|
void |
clearSession()
Method to clear the R session. |
void |
cp(String source,
String destination)
Copy a R Object into another one (similar to the linux cp instruction). |
void |
dget(String rObject,
File inputFile)
Use the dget rInstruction to store the content of a file (created with the dput instruction) into a R object. |
void |
dget(String rObject,
String inputFileName)
Use the dget rInstruction to store the content of a file (created with the dput instruction) into a R object. |
void |
dput(String rObject,
File outputFile)
Use the dput R instruction to store the content of a R object to a file. |
void |
dput(String rObject,
String outputFileName)
Use the dput R instruction to store the content of a R object to a file. |
File |
getwd()
Get the actual R session working directory |
Boolean |
isAutoCommit()
Method to know if engine is in autocommit mode. |
void |
loadRData(File directory)
Load a specific R session : Load .RData file located in directory |
void |
loadRData(File directory,
String fileName)
Load a specific R session : Load the "fileName.RData" file located in directory. |
void |
loadRData(String fileName)
Load the "fileName.RData" file located in current working directory. |
String[] |
ls()
Method to get all the R object in session. |
void |
mv(String source,
String destination)
Method similar to the linux mv instruction : move an object to a destination, or in this case, rename a R object. |
void |
plot(String filename,
String x,
String y,
String type,
String main,
String sub,
String xlab,
String ylab,
String asp)
|
void |
remove(String rObject)
Remove a R object from the R session using the R method : remove(rObject). |
void |
saveRData(File directory)
Save the session in a .RData file in directory |
void |
saveRData(File directory,
String fileName)
Save a R session in a fileName.RData file located in directory. |
void |
saveRData(String filename)
Save the session in a .RData file in current working directory |
void |
setAutoCommit(Boolean autocommit)
Change the autocommit mode of the engine. |
void |
setwd(File directory)
Set the R working directory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nuiton.j2r.REngine |
|---|
commit, eval, evalScript, init, terminate, voidEval |
| Field Detail |
|---|
protected Boolean autocommit
| Constructor Detail |
|---|
public REngineAbstract()
| Method Detail |
|---|
public void loadRData(File directory)
throws RException
loadRData in interface REnginedirectory - directory where the .RData file is located
RException - if an error occur while loading the R session file
public void loadRData(File directory,
String fileName)
throws RException
loadRData in interface REnginedirectory - directory where the ".RData" file is locatedfileName - name of the file to load (will load the fileName.RData
file)
RException - if an error occur while loading the R
session file.
public void loadRData(String fileName)
throws RException
loadRData in interface REnginefileName - name of the file to load (will load the fileName.RData
file)
RException - if an error occur while loading the R
session file.
public void saveRData(File directory)
throws RException
saveRData in interface REnginedirectory - where the .RData file will be saved
RException - if an error occur while saving the R
session.
public void saveRData(String filename)
throws RException
saveRData in interface REnginefilename - the .RData filename (will be followed by .RData)
RException - if an error occur while saving the R
session.
public void saveRData(File directory,
String fileName)
throws RException
saveRData in interface REnginedirectory - where the ".RData" file will be locatedfileName - name of the file to save (will save in the fileName.RData
file)
RException - if an error occur while saving the R
session.
public void setwd(File directory)
throws RException
setwd in interface REnginedirectory - to set
RException
public File getwd()
throws RException
getwd in interface REngineRException
public void dput(String rObject,
String outputFileName)
throws RException
dput in interface REnginerObject - name of the R object to saveoutputFileName - name of the file to save
RException
public void dget(String rObject,
String inputFileName)
throws RException
dget in interface REnginerObject - name of the R object createdinputFileName - name of the file to load
RException
public void dput(String rObject,
File outputFile)
throws RException
dput in interface REnginerObject - R object to saveoutputFile - the file to save
RException
public void dget(String rObject,
File inputFile)
throws RException
dget in interface REnginerObject - name of the R object createdinputFile - file to load
RException
public void remove(String rObject)
throws RException
remove in interface REnginerObject - name of the R object to be removed.
RException - if an error occur while trying to
remove the R object.
public void mv(String source,
String destination)
throws RException
mv in interface REnginesource - source R object namedestination - destination R object name
RException - if an error occur while trying to move
the R object.
public void cp(String source,
String destination)
throws RException
cp in interface REnginesource - source R object namedestination - destination R object name
RException - if an error occur while trying to
assign the source to the destination
public String[] ls()
throws RException
ls in interface REngineRException - if an error occur while trying to list
the R objects in session.
public void clearSession()
throws RException
clearSession in interface REngineRException - if an error occur while trying to clear
the session
public void setAutoCommit(Boolean autocommit)
throws RException
setAutoCommit in interface REngineautocommit - true for autocommit mode, false for no-autocommit mode.
RException - if an error occur while commiting all
the R instructions stored.public Boolean isAutoCommit()
isAutoCommit in interface REngine
public void plot(String filename,
String x,
String y,
String type,
String main,
String sub,
String xlab,
String ylab,
String asp)
throws RException
plot in interface REnginefilename - x - y - type - main - sub - xlab - ylab - asp -
RException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||