I'm wondering if there are any functions, that run a function.
For example if the simplest function I could write is something like:
function(){
print("hello world")
}
However as far as I know the only way to "run" this function is to run something like:
my_fun <- function(){
print("hello world")
}
my_fun()
Is there a way to achieve this result without giving the function an object? Intuitively I think this is not too different than what %>% does, but I'm having trouble thinking about how to do this. Is there a function that I could pipe into to run this function without giving it it's own object?