Hi! I have been working with a set of data that I wanted to calculate a Hypervolume from. After succesfully doing so, scaled it and calculated its centroid. Now I am trying to do the reverse of scaling on the centroid result so I can compare it to another one, but I do not know how to proceed. I have tried using the apply function but I am quite unfamiliar with it, so I am not doing it right. Here is my relevant code:

I do not see where you stored values for sd and mean that are used in your last apply() function. I do not know what kind of object centroid_Celtisaustralis is, so the code below may need to be adjusted.
Here is an example of calculating with scaled data and reversing the scaling to get the equivalent answer with the unscaled data. Notice that I stored the mean and standard deviation of each column so I could reverse the scaling.

Then that is probably my problem, since I have not stored the values of mean and sd for each column. Would it be possible to adjust this code so that it works with the columns of a dataframe? Thank you.

Yes it is. I had tried something similar to that line before but it did not work. I have tried again and now it does. I must have made a mistake along the way. Thank you very much.