I need to come up with a formula to analyze my data. Here is an example of my data frame:

View attachment 6632

Every Row is a biological function that is relevant in Cancer.

Column n means Normal case

Columns with t mean Tumour case (3 individuals in the example)

Columns with d mean Drug case (3 individuals in the example)

t is the mean of the tumour cases and d the mean of the drug cases

Column n means Normal case

Columns with t mean Tumour case (3 individuals in the example)

Columns with d mean Drug case (3 individuals in the example)

t is the mean of the tumour cases and d the mean of the drug cases

The perfect Drug should be one that is very similar to a normal case and dissimilar to a Tumour. In the real analysis I have around 1000 Drugs and 150 functions, so it would be ideal if I could somehow take into account how many functions are affected by the drug towards a normal case and away from a tumour case for each drug.

Also, if there was a way to plot it so that each point could be a drug to visualize those which are in a "useful area" that would be great.

PS: I am working in R