AUC function in DescTools (version 0.99.28)

This makes much more sense. I was very surprised in your earlier post, to be honest.

Since you've figured out that trapezium is the best, for each of the graphs (that you have to do), you'll just have to do DescTools::AUC(x = u, y = v), where u and v respectively store the abscissa and ordinate. It works since trapezoid is the default method.

Obviously, you don't need to plot all the graphs (you can, if you want), and since you'll use only one method, sapply is not necessary anymore.

That's actually simple. All you've to do is to place your code in between a pair of triple backticks (```). Or, paste the code, select it, and click the </> button in the toolbar above. You may try to edit your earlier post.

Now that your problem is solved, will you consider marking this thread as solved? Feel free to choose one of your own posts.

If you don't know how, take a look at this post: