public interface REngine
Modifier and Type | Method and Description |
---|---|
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.
|
Object |
evalScript(String expr)
Evaluate the multi-line 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 |
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 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.
|
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 evaluateRException
- if an error occured while trying to evaluate the
expression.Object evalScript(String expr) throws RException
expr
- the multi-line expression to evaluate.RException
- if an error occur while trying to evaluate the
expression.void terminate() throws RException
RException
void loadRData(File directory) throws RException
directory
- directory where the .RData file is locatedRException
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 savedRException
void setwd(File directory) throws RException
directory
- to setRException
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 saveRException
void dget(String rObject, String inputFileName) throws RException
rObject
- name of the R object createdinputFileName
- name of the file to loadRException
void dput(String rObject, File outputFile) throws RException
rObject
- R object to saveoutputFile
- the file to saveRException
void dget(String rObject, File inputFile) throws RException
rObject
- name of the R object createdinputFile
- file to loadRException
void remove(String rObject) throws RException
rObject
- to be removed from the sessionRException
void mv(String source, String destination) throws RException
source
- the object to be copied and deleteddestination
- the object to be createdRException
void cp(String source, String destination) throws RException
source
- the object to be copieddestination
- the object to be createdRException
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
Copyright © 2006–2018 CodeLutin. All rights reserved.