I tried to run this code in R to calculate the revenue a company makes from premiums after n years but I keep getting the replacement has length zero error. (power_of_TM is