This class runs R code from a file using the console or runs a command via an R server session.
More...
|
static void | SetReferenceManager (ReferenceManager rm) |
|
static void | SetRScriptPath (string path) |
|
static string | RunFromCmd (string rCodeFilePath, string args, bool writeOut) |
| Runs an R script from a file using Rscript.exe. Example: RScriptRunner.RunFromCmd(curDirectory + "\ImageClustering.r", curDirectory.Replace('\','/')); Getting args passed from C# using R: args = commandArgs(trailingOnly = TRUE) print(args[1]); More...
|
|
static void | WriteToServer (string s) |
| Run R code on a running r server session instead of starting a new process and loading the object again. Send it to the server by writing the command to run into the "<servername>.input.R". The R backend will read this file once every second and run the commands inside it via "source(input.R)". More...
|
|
static string | RunRScript (string path, string args="") |
| Runs an R script. More...
|
|
|
static ReferenceManager | referenceManager |
|
static ArrayList | geneResult = new ArrayList() |
|
static bool | serverIdle = true |
|
This class runs R code from a file using the console or runs a command via an R server session.
◆ RunFromCmd()
static string CellexalVR.AnalysisLogic.RScriptRunner.RunFromCmd |
( |
string |
rCodeFilePath, |
|
|
string |
args, |
|
|
bool |
writeOut |
|
) |
| |
|
static |
Runs an R script from a file using Rscript.exe. Example: RScriptRunner.RunFromCmd(curDirectory + "\ImageClustering.r", curDirectory.Replace('\','/')); Getting args passed from C# using R: args = commandArgs(trailingOnly = TRUE) print(args[1]);
- Parameters
-
rCodeFilePath | File where your R code is located. |
args | Multiple R args can be seperated by spaces. |
writeOut | If the stdout and stderror should be appended to the R log. |
- Returns
- Returns a string with the R responses.
◆ RunRScript()
static string CellexalVR.AnalysisLogic.RScriptRunner.RunRScript |
( |
string |
path, |
|
|
string |
args = "" |
|
) |
| |
|
static |
Runs an R script.
- Parameters
-
path | The path to the R script. |
args | The arguments, seperated by spaces. |
- Returns
- The result from the R process.
◆ WriteToServer()
static void CellexalVR.AnalysisLogic.RScriptRunner.WriteToServer |
( |
string |
s | ) |
|
|
static |
Run R code on a running r server session instead of starting a new process and loading the object again. Send it to the server by writing the command to run into the "<servername>.input.R". The R backend will read this file once every second and run the commands inside it via "source(input.R)".
- Parameters
-
s | s is the full string to be written into the input.R file which the server will then read. |
isFile | If the s argument instead is a filePath the function copies that entire file to input.R |
The documentation for this class was generated from the following file:
- cellexalvr_cloudxr/Assets/Scripts/AnalysisLogic/RScriptRunner.cs