Displaying 1 result from an estimated 1 matches for "createcompiledfunct".
2012 Jan 06
1
Assign and cmpfun
...d.all.functions <- ls.str(mode = 'function')
for(i in seq_along(find.all.functions)) {
assign(find.all.functions[i], cmpfun(get(find.all.functions[i])))
}
But remember told that using assign is generally a bad idea, and ideally i
want to functionalize this to say something like:
CreateCompiledFunctions <- function() {
find.all.functions <- ls.str(mode = 'function')
for(i in seq_along(find.all.functions)) {
assign(find.all.functions[i], cmpfun(get(find.all.functions[i])))
}
}
Does anyone have a better solution?
Thanks in advance
Mike
[[alternative HTML version del...