title: Matrix Corrrelation in R
body: <p>I am trying to create a correlation matrix with R but I am having problems. All the tutorials usually use very small datasets, however, I need to select 8 rows from a big dataset and one more variable that's average of two rows. I am not sure how to do the part where I select specific rows. Can someone help me out with that? I would really appreciate any help.</p>
  
  <p>Someone asked me for a sample:</p>
  
  <p>"NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, 0.1577, NA, 0.2197, NA, 0.348, 
      NA, 0.086, NA, NA, NA, NA, NA, NA, NA, NA, 0.3768, NA, 0.2163, 
      NA, 0.336, NA, 0.329, NA, NA, NA, NA, NA, NA, NA, NA, 0.2881, 
      NA, 0.0632, NA, 0.235, NA, 0.167, NA, NA, NA, NA, NA, NA, 
      NA, NA, 0.2076, NA, 0.3705, NA, 0.164, NA, 0.255, NA, NA, 
      NA, NA, NA, NA, NA, NA, 0.1795, NA, 0.3649, NA, 0.246, NA, 
      0.628, NA, NA, NA, NA, NA, NA, NA, NA, 0.0227, NA, 0.3975, 
      NA, 0.176, NA, 0.13, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, 0.5, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      0.6333, NA, 0.3627, NA, 0.603, NA, 0.408, NA, NA, NA, NA, 
      NA, NA, NA, NA, 0.6667, NA, 0.8889, NA, 0.6, NA, 0.6, NA, 
      NA, NA, NA, NA, NA, NA, NA, 0.0545, NA, 0.2547, NA, 0.431, 
      NA, 0.126, NA, NA, NA, NA, NA, NA, NA, NA, 0.2388, NA, 0.5514, 
      NA, 0.32, NA, 0.424, NA, NA, NA, NA, NA, NA, NA, NA, 0.6667, 
      NA, 0.3867, NA, 0.313, NA, 0.75, NA, NA, NA, NA, NA, NA, 
      NA, NA, 0.752, NA, 0.482, NA, 0.349, NA, 0.24, NA, NA, NA, 
      NA, NA, NA, NA, NA, 0.5161, NA, 0.641, NA, 0.643, NA, 0.438, 
      NA, NA, NA, NA, NA, NA, NA, NA, 0.3492, NA, 0.3, NA, 0.391, 
      NA, 0.645, NA, NA, NA, NA, NA, NA, NA, NA, 0.3531, NA, 0.5755, 
      NA, 0.667, NA, 0.751, NA, NA, NA, NA, NA, NA, NA, NA, 0.2941, 
      NA, 0.5119, NA, 0.294, NA, 0.526, NA, NA, NA, NA, NA, NA, 
      NA, NA, 0.2941, NA, 0.1515, NA, 0.3, NA, 0.124, NA, NA, NA, "</p>