public abstract class REngineAbstract extends Object implements REngine
Modifier and Type | Field and Description |
---|---|
protected Boolean |
autocommit
If true, commit each R instruction on the fly, if false, commit only when
the commit() method is called.
|
Constructor and Description |
---|
REngineAbstract() |
Modifier and Type | Method and Description |
---|---|
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
|
protected Boolean autocommit
public void loadRData(File directory) throws RException
loadRData
in interface REngine
directory
- directory where the .RData file is locatedRException
- if an error occur while loading the R session filepublic void loadRData(File directory, String fileName) throws RException
loadRData
in interface REngine
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.public void loadRData(String fileName) throws RException
loadRData
in interface REngine
fileName
- 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 REngine
directory
- where the .RData file will be savedRException
- if an error occur while saving the R
session.public void saveRData(String filename) throws RException
saveRData
in interface REngine
filename
- 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 REngine
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.public void setwd(File directory) throws RException
setwd
in interface REngine
directory
- to setRException
public File getwd() throws RException
getwd
in interface REngine
RException
public void dput(String rObject, String outputFileName) throws RException
dput
in interface REngine
rObject
- name of the R object to saveoutputFileName
- name of the file to saveRException
public void dget(String rObject, String inputFileName) throws RException
dget
in interface REngine
rObject
- name of the R object createdinputFileName
- name of the file to loadRException
public void dput(String rObject, File outputFile) throws RException
dput
in interface REngine
rObject
- R object to saveoutputFile
- the file to saveRException
public void dget(String rObject, File inputFile) throws RException
dget
in interface REngine
rObject
- name of the R object createdinputFile
- file to loadRException
public void remove(String rObject) throws RException
remove
in interface REngine
rObject
- 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 REngine
source
- source R object namedestination
- destination R object nameRException
- if an error occur while trying to move
the R object.public void cp(String source, String destination) throws RException
cp
in interface REngine
source
- source R object namedestination
- destination R object nameRException
- if an error occur while trying to
assign the source to the destinationpublic String[] ls() throws RException
ls
in interface REngine
RException
- if an error occur while trying to list
the R objects in session.public void clearSession() throws RException
clearSession
in interface REngine
RException
- if an error occur while trying to clear
the sessionpublic void setAutoCommit(Boolean autocommit) throws RException
setAutoCommit
in interface REngine
autocommit
- 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
Copyright © 2006–2018 CodeLutin. All rights reserved.