Difference between revisions of "Movariable"

From Testiwiki
Jump to: navigation, search
m
(redirected)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Opasnet]]
+
#REDIRECT [[OpasnetUtils]]
[[Category:R tools]]
 
{{method|moderator=|stub=Yes}}
 
 
 
==Description==
 
movariable takes a data.frame, a function, and a list and makes an ovariable out of them. It is a subfunction of [[make.ovariable]] and prevents infinite recursion of S4 methods.
 
 
 
==Code==
 
<rcode
 
name="answer"
 
label="Initiate functions"
 
graphics="1"
 
>
 
library(OpasnetBaseUtils)
 
library(xtable)
 
 
 
n <- 5
 
 
 
# MOVARIABLE ########## movariable takes a data.frame, a function, and a list and makes an ovariable out of them. It is a
 
#####subfunction of make.ovariable and prevents infinite recursion of S4 methods.
 
movariable <- function(
 
data,
 
formula,
 
dependencies,
 
name
 
) {
 
output <- interpret(data)
 
out <- new("ovariable",
 
name        = name,
 
output      = output,
 
data        = data,
 
marginal    = ifelse(colnames(output) %in% c("Result", "Unit"), FALSE, TRUE),
 
formula      = formula,
 
dependencies = dependencies
 
)
 
out <- update(out)
 
return(out)
 
}
 
 
 
 
 
</rcode>
 
 
 
==See also==
 
 
 
* [[OpasnetBaseUtils]]
 
* [[Object-oriented programming in Opasnet]]
 
* [[Opasnet (R library)]]
 

Latest revision as of 12:50, 20 August 2014

Redirect to: