## R Exercises for Beginners – 11-20 – Easy Functions

1. a. Write a function “myfun” of x to the power of its index position (x, x^2, x^3, …) b. Test the function with an x of 1:10 c. Enlarge the function “myfun” with a division through the index position (x, x^2 / 2, x^3 /3, …) 2. a. Write a simple moving average