Difference between revisions of "Statistical Algorithms Importer: R-blackbox Project FAQ"

From Gcube Wiki
Jump to: navigation, search
(Created page with "{| align="right" ||__TOC__ |} F.A.Q. of Statistical Algorithms Importer (SAI), here are common mistakes we have found in R-blackbox Project. == Parameters == This type of pr...")
 
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
|}
 
|}
  
F.A.Q. of Statistical Algorithms Importer (SAI), here are common mistakes we have found in R-blackbox Project.
+
F.A.Q. of [[Statistical_Algorithms_Importer|Statistical Algorithms Importer (SAI)]], here are common mistakes we have found in R-blackbox Project.
 +
 
 +
Please also consider the [[Statistical_Algorithms_Importer:_R_Project_FAQ|R Project FAQ]] as support.
  
 
== Parameters ==
 
== Parameters ==
Line 21: Line 23:
  
 
Remember that the algorithm runs take place on servers (DataMiner server) that are different from those where your workspace files are stored.
 
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 then stored in your workspace.
+
These receive data for executions and produce the results that are stored in your workspace.
So 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.
+
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.
  
  
  
 
[[Category:Statistical Algorithms Importer]]
 
[[Category:Statistical Algorithms Importer]]

Latest revision as of 17:55, 18 October 2018

Contents

F.A.Q. of Statistical Algorithms Importer (SAI), here are common mistakes we have found in R-blackbox Project.

Please also consider the R Project FAQ as 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.