|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface REngine
This interface is the common part between the different technologies used to access R.
| Method Summary | |
|---|---|
void |
clearSession()
Remove all the objects present in the actual R session. |
void |
commit()
Commit all the R instructions that have been stored and not commited yet. |
void |
cp(String source,
String destination)
Copy an object. |
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. |
Object |
eval(String expr)
Evaluate the expression given in parameter in R. |
File |
getwd()
Get the actual R session working directory |
boolean |
init()
Initialize the engine. |
Boolean |
isAutoCommit()
Return the autocommit status |
void |
loadRData(File directory)
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 filename.RData file located in current working directory |
String[] |
ls()
List all R object present in the actual session |
void |
mv(String source,
String destination)
Make a copy of an object and remove the old one. |
void |
remove(String rObject)
Remove a R object from the actual session |
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 a R session in a filename.RData file located in the current working directory |
void |
setAutoCommit(Boolean autocommit)
Set the autocommit property. |
void |
setwd(File directory)
Set the R working directory |
void |
terminate()
End the engine use. |
void |
voidEval(String expr)
Evaluate the expression given in parameter in R without result returned. |
| Method Detail |
|---|
boolean init()
Object eval(String expr)
throws RException
expr - the expression to evaluate.
RException - if an error occur while trying to evaluate the
expression.
void voidEval(String expr)
throws RException
expr - the expression to evaluate
RException - if an error occured while trying to evaluate the
expression.
void terminate()
throws RException
RException
void loadRData(File directory)
throws RException
directory - directory where the .RData file is located
RException
void loadRData(String filename)
throws RException
filename - name of the .RData file (will be followed by .RData)
RException
void saveRData(File directory)
throws RException
directory - where the .RData file will be saved
RException
void setwd(File directory)
throws RException
directory - to set
RException
File getwd()
throws RException
RException
void dput(String rObject,
String outputFileName)
throws RException
rObject - name of the R object to saveoutputFileName - name of the file to save
RException
void dget(String rObject,
String inputFileName)
throws RException
rObject - name of the R object createdinputFileName - name of the file to load
RException
void dput(String rObject,
File outputFile)
throws RException
rObject - R object to saveoutputFile - the file to save
RException
void dget(String rObject,
File inputFile)
throws RException
rObject - name of the R object createdinputFile - file to load
RException
void remove(String rObject)
throws RException
rObject - to be removed from the session
RException
void mv(String source,
String destination)
throws RException
source - the object to be copied and deleteddestination - the object to be created
RException
void cp(String source,
String destination)
throws RException
source - the object to be copieddestination - the object to be created
RException
String[] ls()
throws RException
RException
void clearSession()
throws RException
RException
void setAutoCommit(Boolean autocommit)
throws RException
autocommit - If true, R instructions are sent when they are thrown. If
false, the instructions are stored in a LinkedList and the
user needs to explicit the commit() instruction.
RException - if an error occured during the commit operation.Boolean isAutoCommit()
void commit()
throws RException
RException
void loadRData(File directory,
String fileName)
throws RException
directory - 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.
void saveRData(File directory,
String fileName)
throws RException
directory - 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.
void saveRData(String filename)
throws RException
filename -
RException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||