title: Standard deviation of each row between two columns in R
body: <p>I have a simple query. I am trying to get the standard deviation of each row between two columns in an array (n=2 for the length of the array; I know it's a small sample size)</p>
  
  <p>It forms part of a longer code but simply: </p>
  
  <pre><code>data$i  &lt;- sd(data$x, data$y)^2 + (0.1)^2 / data$j
  </code></pre>
  
  <p>so my data would look like this: </p>
  
  <pre><code>x   y
  3   13
  4   9
  19  3
  14  3
  18  4
  3   10
  9   4
  3   6
  3   8
  10  9
  8   10
  11  9
  13  12
  15  14
  19  16
  8   8
  8   18
  11  14
  10  12
  18  14
  12  20
  6   8
  </code></pre>
  
  <p>and, just using the <code>sd()</code>, I would like to get this:</p>
  
  <pre><code>7.1
  3.5
  11.3
  7.8
  9.9
  4.9
  3.5
  2.1
  3.5
  0.7
  1.4
  1.4
  0.7
  0.7
  2.1
  0.0
  7.1
  2.1
  1.4
  2.8
  5.7
  1.4
  </code></pre>