I want to distribute an R object that is a function. For instance, say, here is my function:
f <- function(x) (x * x)
save(f, file = "f.rda")
Then,
load("f.rda")
gives me the function 'f', however, when I type
f
function(x) (x * x)
Is it possible to have this function f, but to hide what is in the source code.
I guess in some sense, I am probably asking for an equivalent to the pre-compiled "binary object file" without the source code.
Any suggestions will be greatly appreciated. I am not sure that this is necessarily possible.