title: How to convert columns of data into z-scores?
body: <p>I have a tab separated text file containing several columns of data. I want to convert the values in each column into z-scores, so that I can better compare the distributions in each column. Does anyone know of a fast way to do this? I have been learning <strong>R</strong> and think that <strong>R</strong> probably has an efficient way to do this, but any solutions are welcome. I want to use the z-scores to make some figures for a presentation tomorrow, so speed is of the essence. </p>
  
  <p>Example of table:</p>
  
  <pre><code>CHROM   BIN_START   BIN_END N_VARIANTS  dataset1    dataset2    dataset3    dataset4    dataset5    dataset6    dataset7
  chr1    1   500000  3881    0.0287298   0.0527506   0.0306643   0   0   0.12356 0
  chr1    500001  1000000 3370    0.026538    0   0   0   0   0.0887265   0
  chr1    1000001 1500000 2851    0.10893 0   0.0391224   0   0   0.0074585   0
  chr1    1500001 2000000 3167    0.0612552   0   0   0   0   0.0527309   0
  chr1    2000001 2500000 2592    0.154722    0   0.00540119  0   0   0.276087    0
  chr1    2500001 3000000 4096    0.0214323   0.0521432   0   0.0505466   0.0367322   0.0147888   0
  chr1    3000001 3500000 3825    0.100806    0   0.203501    0.00675269  0   0.10611 0.122551
  chr1    3500001 4000000 2597    0   0.172489    0   0.127946    0.0976384   0.058526    0
  chr1    4000001 4500000 3497    0   0.0280811   0   0.0137599   0   0.113574    0.0452258
  chr1    4500001 5000000 4828    0   0.019744    0   0   0.0231157   0   0
  chr1    5000001 5500000 4314    0.0247076   0   0   0.00943007  0.00186957  0.0240571   0.138595
  chr1    5500001 6000000 3529    0.0168133   0   0.00544462  0   0   0   0
  chr1    6000001 6500000 2396    0   0   0.0425213   0   0   0.0176949   0
  chr1    6500001 7000000 4154    0   0.0827602   0   0   0   0.0583389   0
  chr1    7000001 7500000 2590    0   0   0   0   0.106904    0   0.0885134
  chr1    7500001 8000000 2939    0.108101    0.0472759   0.0201759   0.0169716   0.176171    0.0371988   0.154431
  chr1    8000001 8500000 3820    0   0   0   0.0081009   0   0.0305172   0
  </code></pre>