I am new with R. If you could help me that would be great. My problem is as follows:
Lets say I have 5 groups, Group1, Group2, Group3, Group4 and Group5, each containing 100 data points.
Now I want to compare these groups with each other, using either t-test or ks-test and want to generate a matrix of p-values. Essentially, there would a 5x5 matrix of p-values. I have done similar kind of work with correletions using corr.mat
function.
Here, 5 groups are for just illustrative purpose, at the end of the day I ahve to do it on almost 250 groups thus I have to generate a matrix of 250x250 containing p-values.
If anyone of you could help me to achieve this, it would be much kind of you.
Things I know in R so far:
Load the data into R by loading .csv file:
my.data = read.csv(file.choose())
attach(your.data)
If you know how to compute an individual p-value, you can just put that code in a loop.
You could also use
outer
: