My dataset has 3000 observations (rows) and 24 variables (columns). First 12 (column 1 to 12) variables are price value from January to December in a year. The remaining 12 variables (column 13 to 24) are rent value from January to December in the same year. I would like to caculate the price/rent for each month and add the 12 new ratios columns to the end of my origianl dataset. How can I do this in R?
Thank you in advance!