In your RStudio interface, open a new R Script window. (Check Lesson 1.2.4 for
instructions on running R scripts.) Define an R function named unit() that calculates the number of weekly units that Mary Fresh needs for a particular product to replenish her inventory with the following three arguments:
sales: the annual sales revenue of the product (required)
unit_cost: the per-unit cost of the product (required)
profit: the profit margin (optional with the default value of 0.05)
The number of units is calculated by: = ∗ (1 − po)/(_co ∗ 52).
Please make sure your function rounds up the decimal values and returns whole numbers only. (Hint: You may find the integer division %/% by 1 helpful.)
Execute your codes to define the function. Write an R statement in your script window to test it using sales = 10000 and unit_cost = 15.5. Your function should return 12.