Statistical Algorithms Importer: R-blackbox Project FAQ
Contents |
F.A.Q. of Statistical Algorithms Importer (SAI), here are common mistakes we have found in R-blackbox Project.
Please also consider the Statistical_Algorithms_Importer:_R-blackbox_Project_FAQ as a support.
Parameters
This type of project (other than an R project) requires that the parameters are passed at command line when your R file is invoked. This is why your R file must be able to directly read the arguments passed in the command line. As you can see from the invocation:
- Rscript --vanilla rscript.R "parameter1" "parameter2" "parameterN"
so:
- args[1] = "parameter1"
In this case, if in your algorithm parameter1 is a file you can read the file in this way:
- file_input <- file(args[1], "r")
Remember that the algorithm runs take place on servers (DataMiner server) that are different from those where your workspace files are stored. These receive data for executions and produce the results that are stored in your workspace. Moreover, if the algorithm produces output files then the names of these files must be written as default values when the output parameters are declared in the SAI project.