OpasnetUtils/Fetch: Difference between revisions

From Opasnet
Jump to navigation Jump to search
mNo edit summary
 
(4 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"
>
# 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.
https://www.opasnet.org/svn/opasnet_utils/trunk/R/Fetch.r
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