Can someone write a custom function in R for me?

Can someone write a custom function in R for me? I’m having trouble YOURURL.com it to work and after I tried it out, it seemed to work like a charm, which is why I’m asking for help. Here are the results for my test: > f( 1 2 5 6 > > f( my_f = f(