I have a function that takes an input of a function.
myfunc <- function(FUN){}
There, I want to check if FUN is a mean
, and perform some more task
myfunc <- function(FUN){
``some tasks here``
if(FUN==mean){``some more task here``} # this FUN==mean is not valid
}
However, it seems FUN can't be compared with this way. Is there a way to check if a specific function is inputed?