These functions translated with "apply"?

Good morning guys,
I've got the notice to translate these functions with the apply, but I'm not really expert with R for adpating well these kinds of apply, so anyone knows how to translate my functions with apply?


Kind regards,

Hi guys, good night if you want I can share with you the code... not considering the images that I posted this morning.....