R mini exercise

Job ID: 31761657

Budget: $10 – $30 USD

rewrite the code by using a custom function that can be used four times with different settings to generate the output