Calculating mortgage payments : I want to perform a calculation to know all the capital and interest payments of my loans. I managed to calculate for one loan, however, I want to get all the results in a table and probably do the calculation for each one with a for loop.

I tried to get some functions that are already in R, but none of them worked.

This is a subset of my data:
```
structure(list(ID = c(29347, 159664, 173960, 64643, 64664, 64686
), Amount = c(2e+06, 2428508.41, 7729095, 11355, 2e+05, 2500000
), Interest_rate = c(19, 12.5, 10, 8.5, 18, 14), Starting_date = structure(c(1332979200, 
1531958400, 1545782400, 1395100800, 1394755200, 1395100800), class = c("POSIXct", 
"POSIXt"), tzone = "UTC"), Loan_lenght = c(3.002739, 5.002739, 
5.005479, 0.49315, 0.49315, 0.99726)), row.names = c(NA, -6L), class = c("tbl_df", 
"tbl", "data.frame"))
```