Difference between revisions of "OpasnetUtils/ComputeDependencies"

From Testiwiki
Jump to: navigation, search
(new version)
m
 
Line 8: Line 8:
 
==Code==
 
==Code==
  
<rcode
+
https://www.opasnet.org/svn/opasnet_utils/trunk/R/ComputeDependencies.r
    label="Initiate functions"
 
    showcode="1"
 
>
 
# ComputeDependencies ############ uses Fetch2, EvalOutput, CheckMarginals and CheckInput to load and pre-process
 
# upstream variables. Typically seen on the first line of ovariable formula code.  
 
# '...' can be used for input substitution, na.rm, number of iterations (N) and others
 
 
 
ComputeDependencies <- function(dependencies, ...) {
 
Fetch2(dependencies)
 
for (i in as.character(dependencies$Name)) {
 
assign(i, EvalOutput(get(i), ...), envir = .GlobalEnv)
 
assign(i, CheckMarginals(get(i), ...), envir = .GlobalEnv)
 
assign(i, CheckInput(get(i), ...), envir = .GlobalEnv)
 
}
 
}
 
</rcode>
 
  
 
==See also==
 
==See also==

Latest revision as of 13:30, 16 August 2012

Description

Uses Fetch2, EvalOutput, CheckMarginals and CheckInput to load and pre-process upstream variables. Typically seen on the first line of ovariable formula code.

Code

https://www.opasnet.org/svn/opasnet_utils/trunk/R/ComputeDependencies.r

See also