Hi all,
I want to make pairwise comparisons of 13 data sets (13 independent experiments). As the cell number differs among experiments it is required to correct the data with x value (the ratio of two cell population sizes). The vector cellno <- c(2.3, 0.5, 1.3, 1.0, 1.6, 1.0, 1.0, 0.8, 1.2, 0.6, 0.8, 0.9, 0.9)
contains information about cell numbers. So, I select first value from vector (i.e. 2.3) and divide each other number by 2.3 to get x.
n <- cellno [1]
for (i in n:length(cellno)) {print (cellno [i] / n)}
However, I want to calculate x for each pair of conditions one by one so I can then run my comparison function for those conditions. It means that I want to calculate x for condition 1 and 2 then make comparison of these conditions, then calculate x for condition 1 and 3 make comparison, next calculate x for condition 1 and 4 and make comparison etc. When I am done with comparison of condition 1st with other 12 I would like to start the same for the condition 2nd etc. Shall I use for loop? How shall I structure the loop? I will appreciate any suggestions/advices.
This is an R programming question. Try on StackOverflow. For your problem, use of the apply family of functions comes to mind.
Ok, I posted my question on stackoverflow. I will have a look at apply function, thanks.