Difference between revisions of "Movariable"

From Testiwiki
Jump to: navigation, search
(Redirected page to OpasnetUtils/Ovariable#movariable)
(Replaced content with "#REDIRECT OpasnetUtils/Ovariable#movariable Category:To be deleted {{method|moderator=|stub=Yes}}")
Line 1: Line 1:
 
#REDIRECT [[OpasnetUtils/Ovariable#movariable]]
 
#REDIRECT [[OpasnetUtils/Ovariable#movariable]]
[[Category:Opasnet]]
+
[[Category:To be deleted]]
[[Category:R tools]]
 
[[Category:OpasnetUtils]]
 
 
{{method|moderator=|stub=Yes}}
 
{{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"
 
>
 
# 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)]]
 

Revision as of 08:36, 15 June 2012