How to resample matrices to test for the robustness of their correlation? I have several populations where I have morphology and diet for each individual. I am interested in the correlation between diet and morphological distances. However the number of individuals in each population ranges from 22 to 80 individuals. I have looked at the correlation diet-morphology for each population and (not surprisingly) the correlation coefficientis is highly correlated with the number of individuals per population. 
I would like to resample (without replacement) the populations with 60-80 individuals and get random samplings of 30 individuals (1000 times). I would like to get a correlation coefficient distribution against which to test the original value of the correlation.
I guess it is possible do this in R, however I have never written a script in R and I am not familiar with resampling techniques at all. 
Any help with coding will be greatly appreciated
Thank you
Camille    
 A: It would help if you could address @onestop's question, and I also agree with @whuber that using the correlation's you've found are probably fine.  But I will try to provide some help with your question. Usually, when we resample, we do so with replacement, and we take a bootsample of the same size as the original sample.  That is, if your sample is size 80, we resample with replacement to get 80 bootobservations in our bootsample (which will include some duplicates).  
There are at least two packages in R that do bootstrapping, but I usually just do it myself.  It's not that much more code and I like setting it up according to my specifications.  Let's say that your data are in a matrix with 2 columns and 80 rows.  You can bootstrap a correlation by sampling rows with replacement, calculating the correlation and storing it.  Here's some sample R code:  
set.seed(1)                            # this is for reproducability
X        = matrix(rnorm(160), ncol=2)  # a generic matix, note that I made no effort 
                                       # to correlate the data, this is just an example
rows     = c(1:80)                     # row numbers to resample over
bootDist = c()                         # a vector to store the output

for(i in 1:1000) {                                 # used a for loop, but it took 1 sec
  bootRows = sample(rows, size=80, replace=T)      # this gives me the rows I will use
  bootDist[i] = cor(X[bootRows,1], X[bootRows,2])  # the cor for that bootsample
}

summary(bootDist)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.5573 -0.3765 -0.2997 -0.2916 -0.2128  0.2336

