Difference between revisions of "OpasnetUtils/Fetch"

From Testiwiki
Jump to: navigation, search
m
m
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Opasnet]]
 
[[Category:Opasnet]]
 
[[Category:R tools]]
 
[[Category:R tools]]
 +
[[Category:OpasnetUtils]]
 
{{method|moderator=|stub=Yes}}
 
{{method|moderator=|stub=Yes}}
 
==Description==
 
==Description==
Line 6: Line 7:
  
 
==Code==
 
==Code==
<rcode
 
name="answer"
 
label="Initiate functions"
 
graphics="1"
 
>
 
library(OpasnetBaseUtils)
 
library(xtable)
 
  
n <- 5
+
https://www.opasnet.org/svn/opasnet_utils/trunk/R/Fetch.r
  
# FETCH ##################### fetch downloads a variable.
 
 
fetch <- function(x, direction = "wide") { # Could think of a version where dependencies table is given as a parameter, and based on Name, Identifier is downloaded from the Base.
 
x <- as.character(x)
 
if(exists(x)) {
 
out <- get(x)
 
} else {
 
out <- tidy(op_baseGetData("opasnet_base", x), direction = "wide")
 
}
 
return(out)
 
}
 
 
</rcode>
 
 
==See also==
 
==See also==
  

Latest revision as of 13:35, 16 August 2012


Description

fetch downloads a variable.

Code

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

See also