I want to find a set of functions and save them, because I want to send them to a remote server in an Rdata file, and I don't want to install a new package on the server.
Although I am getting an error using the approach below, easier / better approaches are welcome.
MWE:
Here are two dummy functions:
abcd.fun.1 <- function() return(1)
abcd.fun.2 <- function() return(2)
I can identify the dummy functions:
ls()[grep('abcd', ls())]
But when I wrap this in a function:
find.test <- function(x) {
return(ls()[grep(x, ls())])
}
find.test('abcd')
The function returns character(0)
Ultimately I would like to
save(find.test('abcd'), file = test.Rdata)