How can I reduce the values in a column by a certain percentage (5%, 10%, 15%, etc.)

Hi! I have an assignment due for a class that requires using R/any data processing software. We are being asked to find the implications of decreasing the cost of a procedure by any given percentage. The best way to do this, I would think, is to make a copy of the column and then scale down the values in the column down by that percentage.

DF <- data.frame(x = c(1, 2, 3, 7, 10), y = c(4, 3, 6, 5, 12), z = c(14, 33, 22, 27, 35))

For example, I would like to decrease the values in column z by 5%. Any suggestions would be super helpful! Thanks!

Hi Hannan, welcome to the community!

Please familiarise yourself with the existing policy regarding assignments:

Oh, okay! Thank you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.