R: How to round values in a data frame but the sum of the values across each row should be a specific total?
Considering this sample data, how do I round the values to whole numbers but the condition is that the values across each row should sum up to 971? While I simply can round the values using round()
, the total of the values across each row will not exactly sum up to 971.